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

48 Commits

Author SHA1 Message Date
Robert Krimen
16a30ee951 Differentiate between direct and indirect eval 2013-02-27 21:23:21 -08:00
Robert Krimen
321cc0dca8 Add _argumentsStash, with better conforming arguments behavior:
1. Can not delete a function parameter
    2. Deleting the index of an arguments object simply
       removes the link to that function parameter
2013-02-24 14:28:07 -08:00
Robert Krimen
840fde7610 Switch function environment to be declarative...
...instead of object.
Also, make sure arguments passed through to function are not deletable.
2013-02-23 14:47:18 -08:00
Robert Krimen
393b9384a5 Fit number (exponent/decimal) formatting to ECMA-262 (slightly better) 2013-02-22 11:50:04 -08:00
Robert Krimen
a24b29ebfe Fix toString(-0) 2013-02-21 19:02:29 -08:00
Robert Krimen
3c9faa2810 Fix String.char*At to look at utf16 version 2013-02-21 14:25:04 -08:00
Robert Krimen
bf322e56ee Fix subtle range bug in String.substring (uint => int64)
Was looking for negative in the following calculation:

uint(0) - uint(3) => uint(0)
2013-02-20 16:24:01 -08:00
Robert Krimen
4e4e89c894 Fix bug in String.slice with a (go) slice bounds violation
Basically, check that start is less than length before trying
to take a slice.

Also, rename valueToArrayIndex to valueToRangeIndex to reflect
the fact that it does not always return a value that is valid
index (value could be length)
2013-02-20 15:58:43 -08:00
Robert Krimen
d297d3c508 Add Number.toString 2013-02-05 11:36:07 -08:00
Robert Krimen
15aadd333c Upgrade underscore to 1.4.4, including tests 2013-02-04 21:58:47 -08:00
Robert Krimen
a879744c20 Add Go <=> JavaScript type interaction
Via reflection for struct, map, and slice/array
Fix #10
2013-02-04 10:31:44 -08:00
Robert Krimen
8044e8ae38 Adjust Makefile (test-synopsis) 2013-01-25 10:46:58 -08:00
Robert Krimen
3696636fce Move test262 & more into a separate distribution 2013-01-25 10:14:14 -08:00
Robert Krimen
a13a891d92 Minor .test262 adjustments 2013-01-24 23:56:48 -08:00
Robert Krimen
668d0fc6a7 Fix broken (panicking) RegExp transformations
Transformations would panic on some edge (error) cases:

    \u0z
    \x_
2012-12-28 15:50:37 -08:00
Robert Krimen
bff799a0e1 Test for correct endIndex when submatching 2012-11-11 16:23:51 -08:00
Robert Krimen
1b39f1b6cc Calculate endIndex from last place of match, not last place of last submatch 2012-11-09 15:36:08 -08:00
Robert Krimen
845172c82c endIndex needs to be an offset from lastIndex 2012-11-07 15:46:21 -08:00
Robert Krimen
d9765234a4 Fix to not bypass finally on continue, break, return, etc. 2012-11-06 17:58:31 -08:00
Robert Krimen
a4de862caa Test condition in case of continue in do-while 2012-11-06 17:27:12 -08:00
Robert Krimen
26f8a53978 Accept out-of-range +/-Infinity (instead of NaNing) 2012-11-06 11:06:45 -08:00
Robert Krimen
68943ba1e4 More (complex) RegExp => RE2 transforming and tests
The unescaping of that which does not need escaping
2012-10-20 23:32:30 -07:00
Robert Krimen
cd4f36ce98 Fix not skipping /* & // after encountering them 2012-10-20 13:45:58 -07:00
Robert Krimen
3a6dcf46ef Don't expose re2 regular expression via //.source 2012-10-20 12:55:29 -07:00
Robert Krimen
f842eda638 Add a String.substr implementation
This will fix #6
2012-10-19 13:26:22 -07:00
Robert Krimen
1728c036d4 Partial rewrite of lexer
- Better identifier scanning
- Less repetition in decoding the stream (cached in readIn)
- Method privitization
2012-10-19 12:24:53 -07:00
Robert Krimen
24e71588dd Add String.fromCharCode 2012-10-18 10:58:23 -07:00
Robert Krimen
7982fa0fac Fix scanning \r, \b, \f, \v as \t
Copy and paste error of epic proportions?

This will fix #5
2012-10-17 18:57:48 -07:00
Robert Krimen
ed98144c35 Remarks on UTF-8/16 2012-10-17 11:54:04 -07:00
Robert Krimen
a780c85861 Fill out switch, for, for-in labelling
This and the previous commit fix #4
2012-10-16 23:11:35 -07:00
Robert Krimen
58cf2a4b67 Add break capability to switch 2012-10-16 22:57:25 -07:00
Robert Krimen
d4c606a2a0 Add test262 testing environment
http://test262.ecmascript.org/
2012-10-16 10:07:04 -07:00
Robert Krimen
a12391834e Sometimes RegExp captures can fail, detect this
Fix #2 (In .exec so far)
2012-10-14 21:45:38 -07:00
Robert Krimen
7dfbf6ab13 Better regular expression syntax checking
And a limitation elaboration
2012-10-12 18:55:41 -07:00
Robert Krimen
c57edbfe2b Alter Object.Call to be more in line with .Get, .Set 2012-10-11 17:57:51 -07:00
Robert Krimen
49dc256af8 Add README.markdown for registry 2012-10-10 16:17:36 -07:00
Robert Krimen
84b4aee178 Add README for underscore 2012-10-10 16:11:46 -07:00
Robert Krimen
5958af6914 Add registry package
Automatic inclusion of source on import
2012-10-10 15:46:10 -07:00
Robert Krimen
2d707b5a97 Don't get carried away with Markdown in godoc 2012-10-10 14:52:52 -07:00
Robert Krimen
b7a70e7470 Add note about commandline otto 2012-10-09 18:58:11 -07:00
Robert Krimen
89e6086ff6 Add embedding example & isolate synopsis testing 2012-10-09 18:47:39 -07:00
Robert Krimen
0134729b74 Fixed synopsis test 2012-10-09 17:27:43 -07:00
Robert Krimen
ade6a169be Partially fix ReferenceError origin reporting 2012-10-09 17:19:29 -07:00
Robert Krimen
326264ae3e Line tracking for error reporting 2012-10-09 16:41:45 -07:00
Robert Krimen
f81f540a01 godocdown 2012-10-08 21:46:25 -07:00
Robert Krimen
d908ab1a55 Always rebuild otto/otto 2012-10-07 19:02:14 -07:00
Robert Krimen
95c6f3edec Markdown-ify README 2012-10-07 17:48:18 -07:00
Robert Krimen
4a8c7ffc00 Initial commit 2012-10-05 18:47:53 -07:00