1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00
Commit Graph

634 Commits

Author SHA1 Message Date
Steven Hartland
1861f2408b Merge pull request #238 from veonik/no-rel-imports
Replaced './terst' relative import with qualified name.
2017-03-08 08:57:57 +00:00
Tyler Sommer
9c716adcc8 Replaced './terst' relative import with qualified name. 2017-03-07 11:15:29 -07:00
Steven Hartland
6a77b7cbc3 Merge pull request #228 from dsnet/master
Fix Test_issue80 on Go 1.8
2017-02-05 01:36:59 +00:00
Steven Hartland
20a18bbe27 Merge pull request #235 from k2wanko/fix-typo-readme
Fix typo in README
2017-02-05 01:35:47 +00:00
Robert Krimen
1c73769694 -gxc 2017-01-21 16:43:39 -08:00
Robert Krimen
c28cc513ff Merge pull request #233 from sstone1/master
Handle []uint16 to boolean conversion (resolves #232)
2017-01-21 16:34:08 -08:00
Kazuhiro Kubota
5caa170cde Fix typo 2017-01-18 17:37:52 +09:00
Robert Krimen
284b08b295 Restore .split returning a proper Array (fix #234) 2017-01-13 18:35:26 -08:00
Robert Krimen
87e059e861 Fix for S15.1.2.3_A2_T10 2017-01-12 16:21:41 -08:00
Robert Krimen
e314343b47 Fix for S15.1.2.2_A2_T10 2017-01-12 16:15:58 -08:00
Robert Krimen
54e1705423 Fix for S9.3.1_A2 2017-01-12 15:54:54 -08:00
Simon Stone
7a965dd45d Handle []uint16 to boolean conversion (resolves #232) 2016-11-24 16:28:05 +00:00
Joe Tsai
41bb429a2c Fix Test_issue80 on Go 1.8
An upstream change (http://golang.org/cl/30371) makes the Go encoder
to be more compliant with the ES6 standard. Ironically, this change
causes Test_issue80 to fail on the larger number ranges.

To make this test work on both Go 1.7 and Go 1.8, we delete the larger
value tests, which are arguably locking in the wrong behavior.
2016-11-08 13:23:43 -08:00
Conrad Pankoff
bf1c3795ba Merge pull request #219 from budadcabrion/master
fix for casting GoArrays on in convertCallParameter
2016-10-04 23:49:59 +11:00
Conrad Pankoff
bda76a056f Merge pull request #218 from dhiltonp/fastsplit
made string splits *much* faster
2016-10-04 23:46:47 +11:00
Conrad Pankoff
d5ddea59ff Merge pull request #211 from yohanbelleguic/fix-example
readme: fix "twoPlus" example function
2016-10-04 23:45:46 +11:00
jan-karl
d93f9dce58 test illustrating the issue 2016-10-01 02:50:38 -04:00
jan-karl
ea095c6386 fix for casting GoArrays on in convertCallParameter 2016-10-01 02:31:40 -04:00
David P Hilton
8b169d526d adjusted benchmark style to match call_test.go, added benchmarks for all regex-related functions. 2016-09-24 15:29:50 -06:00
David P Hilton
5bc6a83c93 added string split benchmark 2016-09-22 15:50:54 -06:00
David P Hilton
7427d59429 made string splits *much* faster 2016-09-22 14:52:38 -06:00
Conrad Pankoff
3e7ca9f192 Merge pull request #216 from hochhaus/master
Document that otto targets ES5
2016-09-19 11:00:42 +10:00
Andy Hochhaus
29f673c4d2 Document that otto targets ES5 2016-09-18 17:59:18 -07:00
Yohan BELLEGUIC
51bbfc0656 readme: fix "twoPlus" example function 2016-08-10 14:37:35 +02:00
Conrad Pankoff
7d9cbc2bef Merge pull request #210 from gagliardetto/patch-2
Add missing code highlighting
2016-07-29 08:04:12 +10:00
Slavomir
5bd804b3a8 Add missing code highlighting 2016-07-28 22:02:30 +02:00
Steven Hartland
c41cf547e0 Merge pull request #204 from xyproto/master
Only minor changes
2016-06-24 10:21:23 +01:00
Alexander F Rødseth
ab54b0b8c6 Use -- instead of -= 1, as recommended by golint 2016-06-24 09:53:49 +02:00
Alexander F Rødseth
e3f7ae2533 Consistent use of "value Value"/"vl Value" 2016-06-24 09:53:47 +02:00
Alexander F Rødseth
e2ef7653d2 Make it clearer that inline is a Perl script 2016-06-24 09:53:43 +02:00
Alexander F Rødseth
2a4ac54b0e Remove executable bit from source file 2016-06-24 09:53:35 +02:00
Conrad Pankoff
e1fe9ec568 Merge pull request #203 from uppfinnarn/newerror-nil-dereference
Fix for #202
2016-06-21 21:51:53 +10:00
uppfinnarn
cb827c7f40 Fix for #202 2016-06-21 13:49:50 +02:00
uppfinnarn
a87f62d034 Failing test for #202 2016-06-21 13:48:49 +02:00
Conrad Pankoff
610cd3ae86 Merge pull request #198 from deoxxa/fix-calling-go-functions-with-gostruct-arguments
fix calling go functions with goStructObject arguments
2016-05-30 13:32:50 +10:00
deoxxa
9597787793 fix calling go functions with goStructObject arguments 2016-05-30 13:30:33 +10:00
Conrad Pankoff
ef5bb303cc Merge pull request #192 from deoxxa/support-inline-source-maps
add support for inline source maps
2016-05-11 10:14:34 +10:00
deoxxa
99d478d5e8 add support for inline source maps 2016-05-08 21:17:26 +10:00
Conrad Pankoff
c562e464c6 Merge pull request #191 from deoxxa/implement-configurable-stack-trace-limit
implement configurable stack trace limit
2016-05-08 18:17:07 +10:00
deoxxa
b6c6f18e54 ensure we clone all required runtime properties 2016-05-08 18:13:57 +10:00
deoxxa
ccf93984d9 implement configurable stack trace limit 2016-05-08 18:13:57 +10:00
Conrad Pankoff
96f57ba9bb Merge pull request #190 from deoxxa/refactor-native-function-parameter-conversion
refactor native function parameter conversion
2016-05-08 10:38:42 +10:00
deoxxa
1fe0007dcb refactor native function parameter conversion
* add benchmarks and tests for native function calls
* improve conversion of various native function parameters
* add support for more types of native function parameters
* improve performance of most parameter types
2016-05-07 21:35:17 +10:00
Conrad Pankoff
ef01634c52 Merge pull request #141 from deoxxa/native-frames-in-stack
make call stacks aware of native functions
2016-05-07 20:56:01 +10:00
deoxxa
668c95f04e make call stacks aware of native functions
* add stackFramesToPop argument to error factories
* put native functions in their own stack frames
* add tests for native stack frames
* amend Context functionality to account for native frames
2016-05-07 20:55:09 +10:00
Conrad Pankoff
3a69c44018 Merge pull request #138 from deoxxa/source-maps
Source maps
2016-05-07 20:50:17 +10:00
deoxxa
bd5fb254e3 add source map support
This patch implements source map support in the parser, the runtime, the
script record, and the stack trace printing.

The library used to parse and use the source maps is gopkg.in/sourcemap.v1.
Unlike earlier versions of this patch, the consumer of otto does not need
parse the source map on their own - it's now handled similarly to parsing
JavaScript content.

To use a source map, the consumer must explicitly parse their source into
a `Script` object with `Otto.CompileWithSourceMap`. The script record
returned from that call will carry source map information with it, and
all location-related functions should reflect the original source
positions.
2016-05-02 19:34:04 +10:00
Conrad Pankoff
a55c9c9461 Merge pull request #176 from deoxxa/add-autocomplete-to-repl
add tab-complete to repl
2016-05-02 19:23:55 +10:00
Conrad Pankoff
353d16e612 Merge pull request #180 from deoxxa/error-stack-property
support the non-standard Error.stack property
2016-05-02 19:23:22 +10:00
deoxxa
c03dfd35cd support the non-standard Error.stack property
Popular runtimes (V8[1], SpiderMonkey[2], IE[3]) support a `stack`
property on Error objects to get the error's stack as a string.

This change adds support to otto for this same feature. It's implemented
in a similar way to V8, using a getter function. This avoids generating
the stack trace (which is done in a loop with string manipulation etc)
unless the user requests it. There's no standard, or even trend, for the
actual _content_ of `stack`, so we basically just copy what V8's traces
look like.

[1]: https://github.com/v8/v8/wiki/Stack%20Trace%20API
[2]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Error/stack
[3]: http://msdn.microsoft.com/en-us/library/windows/apps/hh699850.aspx
2016-05-02 19:22:56 +10:00