Steven Hartland
e378501ad1
Merge pull request #108 from multiplay/array-types
...
Export arrays to common type if possible
2015-12-01 13:13:00 +00:00
Steven Hartland
9c2f751789
Merge pull request #102 from multiplay/arg-processing
...
Fix argument processing for call
2015-12-01 13:11:44 +00:00
Steven Hartland
76d7cb8c49
Merge pull request #111 from dmitris/gofmt
...
minor spacing changes for gofmt compliance
2015-12-01 13:08:41 +00:00
Conrad Pankoff
a0b60d71e6
Merge pull request #112 from emicklei/master
...
Issue #81 add CallerLocation to FunctionCall
2015-12-01 15:18:58 +11:00
Conrad Pankoff
81e59b239e
Merge pull request #129 from zupa-hu/patch-3
...
Fix missing filename in compile-time error
2015-12-01 15:14:13 +11:00
Conrad Pankoff
fcd7dbbdfc
Merge pull request #115 from dop251/fix_stacktrace
...
Fixed stacktrace positions.
2015-12-01 15:11:42 +11:00
Conrad Pankoff
1704aa9869
Merge pull request #119 from flowlo/patch-1
...
Fix README: s/windows/window/
2015-12-01 15:03:13 +11:00
Dmitry Panov
432b4361a7
Fixed TypeError message when evaluating a.b["c"] where a.b is undefined.
2015-10-15 21:07:43 +01:00
zupa
0b15bb491a
Fix missing filename in compile-time error
2015-08-02 10:39:24 +02:00
Ernest Micklei
a05ab134d2
Merge remote-tracking branch 'upstream/master'
2015-08-02 10:30:24 +02:00
zupa
8a2b09b14d
Fix missing filename in compile-time error
2015-06-26 18:46:52 +01:00
Robert Krimen
47082f4308
Look for less than 0, not just -1
...
This fixes #116
2015-06-10 22:48:44 -07:00
Robert Krimen
7597815bd0
Fix toReflectValue(0) => float32
...
This fixes #123
2015-05-07 22:53:02 -07:00
Lorenz Leutgeb
aa1f243099
Fix README: s/windows/window/
2015-04-11 19:51:25 +02:00
Dmitry Panov
9d3cca217b
Fixed error position for "Cannot access member '%s' of %s"
2015-04-04 14:27:24 +01:00
Dmitry Panov
1e5ee63535
Fixed stacktrace positions.
2015-04-01 21:03:24 +01:00
Tim Cooper
d1b4d8ef0e
Fix Go map iteration when looping over non-string keys
2015-03-01 16:44:54 -08:00
Ernest Micklei
81094c6e94
add unit test for FunctionCall CallerLocation()
2015-03-01 21:17:39 +01:00
Ernest Micklei
9919b73823
add CallerLocation to FunctionCall
2015-03-01 08:49:14 +01:00
Dmitry Savintsev
b487603abe
minor spacing changes for gofmt compliance
2015-02-25 21:48:07 +01:00
Steven Hartland
9cb5e6bc30
Merge pull request #6 from stevenh/array-types
...
Export arrays to common type if possible
2015-02-19 11:08:22 +00:00
Steven Hartland
72d92c8e19
Export arrays to common type if possible
...
If there is a common type for all values in an array export to a slice of that type otherwise return a slice of interfaces.
2015-02-17 23:18:23 +00:00
Robert Krimen
c2346f4ada
Merge pull request #103 from multiplay/multi-return
...
Support go multiple return values as an array
2015-02-15 16:28:43 -08:00
Robert Krimen
fa043cd6a1
Merge pull request #104 from multiplay/numeric-params
...
Automatic numeric parameter conversion
2015-02-15 16:13:10 -08:00
Steven Hartland
bbce143912
Merge pull request #1 from stevenh/numeric-params
...
Automatic numeric parameter conversion
2015-02-12 15:51:20 +00:00
Steven Hartland
4066dcefa9
Merge pull request #2 from stevenh/multi-return
...
Support go multiple return values as an array
2015-02-12 15:51:07 +00:00
Steven Hartland
b37428d05b
Merge pull request #3 from stevenh/arg-processing
...
Fix argument processing for call
2015-02-12 15:50:57 +00:00
Steven Hartland
c25bb49761
Automatic numeric parameter conversion
...
Javascript uses int64 (literals) and float64 (default) representations for numbers so to allow easy use of go funcs apply automatic conversion for function parameters where it is safe to do so.
2015-02-12 15:48:45 +00:00
Steven Hartland
40ef8d9463
Fix argument processing for call
...
Fix toValueArray causing "missing runtime" errors due to use of toValue instead of self.toValue which causeed issues with passing values to Otto.Call(...).
2015-02-12 15:11:55 +00:00
Steven Hartland
81b01b9fac
Support go multiple return values as an array
...
Add support for go funcs which return multiple values by returning them as an array.
In the future this can be used along side destructuring assignment to provide a nice way to deal with multiple value returns e.g.
[val, err] = MyGoFunc()
2015-02-12 15:10:58 +00:00
Robert Krimen
dea31a3d39
Fix behavior when breaking a loop into an outer block
...
This fixes #87
2014-07-02 21:33:53 -07:00
linlexing
5dad38eb5d
Fix string representation of GREATER_OR_EQUAL
...
This fixes #82
2014-06-21 21:54:06 -07:00
Robert Krimen
ed456945de
Improve error reporting (again)
2014-06-21 21:16:58 -07:00
Robert Krimen
e6768252c2
Improve error reporting
...
* Delay entering global scope on code evaluation, not runtime creation
This fixes #66
2014-06-12 21:27:32 -07:00
Robert Krimen
709a0aa7ff
Value.string(), .float64(), .bool(), etc.
2014-06-06 21:29:40 -07:00
Robert Krimen
b813fe3676
Fix JSON.stringify treating large integers as float64
...
This fixes #80
2014-06-06 21:08:59 -07:00
Robert Krimen
de36a84a51
Fix cloning of _fnStash
...
This may help #71
2014-06-04 21:53:31 -07:00
Robert Krimen
6c7c425424
Fix toReflectValue to handle Struct, Map, Slice, etc.
...
This fixes #79
2014-06-04 18:08:42 -07:00
Robert Krimen
1a2fa0b815
Fix "Halting Problem" example
...
As discussed in #71 , the original example contains a race condition that could cause the goroutine to block forever.
2014-05-31 13:38:11 -07:00
Robert Krimen
f09ce5eac2
Add mutex locking for .Copy()
2014-05-30 20:27:30 -07:00
Robert Krimen
98be5e74da
go vet
...
This fixes #76
I cheated on some of these.
2014-05-28 21:46:08 -07:00
Robert Krimen
918abeb8d8
The zero value of Value is now defined to be undefined
...
Previously, it was a publically accessible but invalid value (valueEmpty).
* Deprecate internal use of UndefinedValue(), NullValue(), FalseValue(), TrueValue()
* Guard against Empty, Result, Reference values from escaping the package
2014-05-28 21:23:32 -07:00
Robert Krimen
526d3b2fd5
Minor cloning adjustments
...
Mostly cosmetic.
2014-05-27 22:09:57 -07:00
Robert Krimen
9cd045ef04
Simplification & refactor of (parts of) the runtime
...
* Proper lowercasing for internal stuff
* *Environment => *_stash
* ExecutionContext => _scope
* Simpler & shallower call/construct mechanics
* Remove unnecessary fields & methods
* Better scoping (no more stack): []*_scope => _scope.outer
* Some speed improvements
In preparation for #66
2014-05-27 22:05:35 -07:00
Robert Krimen
b7dd9df181
Fix array-like handling in JSON.stringify
...
This fixes #73
2014-05-24 10:05:10 -07:00
Robert Krimen
ba678bc782
Use _runtime.toValue() instead of func toValue()
...
This fixes #72
2014-05-22 20:39:27 -07:00
Igor Kharin
1864a88fa0
Implement strings without value16
...
This fixes #68
Some changes over the original patch, removing references to utf8string.String:
* (better) This removes a dependency on a non-standard (though solid) package
* (better) utf8string.String has mutable parts
* (worse) utf8string.String has a smarter consecutive access approach (by
remembering where the last access was)
* (?) _stringWide allocates a []rune if charAt or charCodeAt access is needed (though
it will only do this once for the string object)
2014-05-18 12:38:15 -07:00
Robert Krimen
6d506b4b2f
Update documention to mention natto
2014-04-26 22:49:27 -07:00
Robert Krimen
058fe32c29
terst
2014-04-26 22:19:01 -07:00
Robert Krimen
70f432f8d5
terst
2014-04-26 11:52:14 -07:00