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

753 Commits

Author SHA1 Message Date
Robert Krimen
5c5dfbf501 Use RegExp.source (not RegExp.toString) when doing new RegExp(RegExp) 2013-05-02 20:23:06 +02:00
Robert Krimen
74a8739188 Cannot supply flags when constructing one RegExp from another 2013-05-02 20:23:06 +02:00
Robert Krimen
de97589c43 RegExp(/xyzzy/) & RegExp(/xyzzy/, undefined) will return a reference to the exact same /xyzzy/ object...
...instead of creating a new copy
2013-05-02 20:23:06 +02:00
Robert Krimen
1628647e05 For RegExp.exec, return the rune index in the string, not the byte index 2013-05-02 20:23:06 +02:00
Robert Krimen
70e8c14c94 Fix broken multiline RegExp behavior
Was actually not being passed through, oops...
2013-05-02 20:23:06 +02:00
Robert Krimen
c8c3533f67 Make note of different RegExp behavior 2013-05-02 20:23:06 +02:00
Robert Krimen
0420accca6 Include .input, .index in the result of a successful RegExp.exec(...) 2013-05-02 20:23:06 +02:00
Robert Krimen
5f5cc09fbc Fix broken RegExp syntax: \c 2013-05-02 20:23:06 +02:00
Robert Krimen
4c85422172 Make encodeURI correspond to the 15.1.3.3 algorithm and encodeURIComponent ito 15.1.3.4 2013-05-02 20:23:06 +02:00
Robert Krimen
83d4565b22 Make decodeURI correspond to the 15.1.3.1 algorithm and decodeURIComponent ito 15.1.3.2 2013-05-02 20:23:06 +02:00
Robert Krimen
149f94f9fb Fix that we were using a non-runtime toValue method with go_array, go_map, and go_struct
This will fix #13
2013-04-30 00:36:46 +02:00
Robert Krimen
b477d8eaed Fix isNaN/isFinite .length & .prototype 2013-04-30 00:18:00 +02:00
Robert Krimen
16030f4b6f Make parseInt behavior correspond to the 15.1.2.3 algorithm 2013-04-30 00:18:00 +02:00
Robert Krimen
a6d6f26c01 Parse float literals of the kind ".01", ".0..." properly 2013-04-30 00:17:59 +02:00
Robert Krimen
b5e40f8a85 Make parseInt behavior correspond to the 15.1.2.2 algorithm 2013-04-28 17:33:00 +02:00
Robert Krimen
2ec9b0843c eval is not a constructor 2013-04-28 11:29:20 +02:00
Robert Krimen
6a4e5a904e eval.prototype === undefined 2013-04-28 11:25:06 +02:00
Robert Krimen
2c4c22ca81 eval.length === 1 2013-04-28 11:24:39 +02:00
Robert Krimen
cc112ca544 Set the prototype of the global object to be the object prototype 2013-04-28 11:00:21 +02:00
Robert Krimen
dfa7a59c6f Always declare a function if an identifier is given 2013-04-27 23:00:22 +02:00
Robert Krimen
cfd5635e46 Fix iterator evaluation to return the proper result if a break happens 2013-04-27 22:03:12 +02:00
Robert Krimen
cc243b17d7 Can now attach a label to a block and have it break properly 2013-04-27 15:52:46 +02:00
Robert Krimen
8ab608b974 Makefile for building of otto/otto*
Fix stray dbg(...) in runtime
2013-04-26 09:27:49 +02:00
Robert Krimen
bf7b0bc5d2 Fix test to pass regardless of time zone (always UTC) 2013-04-26 09:27:20 +02:00
Robert Krimen
d5ced8c71f Slightly better error return on an uncaught panic 2013-04-20 22:30:27 -07:00
Robert Krimen
2277e46d05 tryEvaluate => tryCatchEvaluate 2013-04-20 22:13:19 -07:00
Robert Krimen
2b3f317e3a Finally should still run even if Catch has break, continue, return, etc. 2013-04-20 21:59:42 -07:00
Robert Krimen
8d09167814 HasInstance should only exist on a Function 2013-04-20 21:41:00 -07:00
Robert Krimen
2642607a58 Fix HasInstance to recurse the prototype hierarchy 2013-04-20 20:03:34 -07:00
Robert Krimen
3f54041eb6 Make sure to evaluate (compare) in the proper order 2013-04-20 19:39:52 -07:00
Robert Krimen
4abba5f6c6 For DefaultValue: HintString (not HintNumber) if object is a Date 2013-04-20 19:16:17 -07:00
Robert Krimen
01f5fae58f Date(...) => string (Not an object) 2013-04-20 19:09:27 -07:00
Robert Krimen
7624bc44fe Date() => string (Not an object) 2013-04-20 18:59:58 -07:00
Robert Krimen
345c4705f9 Improve function declaration: adhere more closely to the specification 2013-04-17 16:13:19 -07:00
Robert Krimen
9f1daa280e Make sure delete([].xyzzy) (Array) actually works 2013-04-17 15:08:53 -07:00
Robert Krimen
0da0545485 Add Array.isArray 2013-04-17 11:05:32 -07:00
Robert Krimen
7d0ac026ea Unary postfix operation: return primitive value, not object (or otherwise) 2013-04-17 10:46:00 -07:00
Robert Krimen
fa871c8828 Add Date.toGMTString 2013-04-16 23:02:51 -07:00
Robert Krimen
d223d7576f Add Date.toLocale*String 2013-04-16 23:00:24 -07:00
Robert Krimen
9281104552 Add Date.setYear 2013-04-16 22:44:15 -07:00
Robert Krimen
d5497fbe89 Add Date.getYear 2013-04-16 22:37:17 -07:00
Robert Krimen
a5ae851516 Add Date.UTC 2013-04-16 22:32:14 -07:00
Robert Krimen
b6fdebf8ee Add Date.parse 2013-04-16 22:22:39 -07:00
Robert Krimen
ecf122eaa4 Update dbg 2013-04-16 19:07:36 -07:00
Robert Krimen
36acf405fb Fix (intermittently) failing Date tests due to local timezone dependency 2013-04-16 17:59:59 -07:00
Robert Krimen
9beae809c9 Fix Math.atan() test 2013-04-15 10:26:30 -07:00
Robert Krimen
9184233705 Bundle terst dependency (github.com/robertkrimen/terst) 2013-04-15 10:20:34 -07:00
Robert Krimen
896c393235 Add Math.abs 2013-03-17 22:17:21 -07:00
Robert Krimen
8486fe2d1c Add escape/unescape 2013-03-17 22:06:08 -07:00
Robert Krimen
7b0eac16f9 Add Number.toPrecision 2013-03-07 08:42:48 -08:00