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

741 Commits

Author SHA1 Message Date
Robert Krimen
599d565e55 Use defineOwnProperty (not put) for Array (literal) initialization 2013-06-01 23:11:13 -07:00
Robert Krimen
a8c31cf457 Fix string/array/slice indexing to avoid uint32 => -int issue 2013-06-01 22:17:32 -07:00
Robert Krimen
af47b28fa8 Fix panic when given a generic descriptor in argumentsDefineOwnProperty 2013-06-01 21:59:09 -07:00
Robert Krimen
6669f98a8e Improve type_go_* behavior 2013-05-31 22:50:51 -07:00
Robert Krimen
64182c96bd Handle Ptr properly in type_go_*
Though I'm not sure that &map..., or &[]..., makes sense.
2013-05-30 19:17:57 -07:00
Robert Krimen
f745b98f2b Handle struct, map, & array/slice in exportNative 2013-05-30 18:57:33 -07:00
Robert Krimen
58eefe5c3d Handle toReflectValue of interface{}
Fix #19
2013-05-29 22:45:01 -07:00
Robert Krimen
10bb73298b Edit documentation 2013-05-19 23:03:45 -07:00
Robert Krimen
18630616eb Remove throw behavior from Otto.Call 2013-05-19 21:08:32 -07:00
Robert Krimen
83c56dd73d Add Otto.Call 2013-05-19 19:03:05 -07:00
Robert Krimen
3c139264ef Handle ToValue(nil) 2013-05-19 17:43:08 -07:00
Robert Krimen
e2e79bb697 A Value panic during a FunctionCall is the same as a throw in JavaScript 2013-05-19 15:54:10 -07:00
Robert Krimen
791a2c0c8e Add FunctionCall.Otto 2013-05-19 14:57:01 -07:00
Robert Krimen
0b8a079525 Remove FunctionCall.Run 2013-05-19 14:56:41 -07:00
Robert Krimen
cced87b8e6 Add FunctionCall.Run 2013-05-18 16:24:55 -07:00
Robert Krimen
699232d49a Consolidate run/runSafe into _runtime 2013-05-18 16:18:17 -07:00
Robert Krimen
d2eaa4aab6 Add Object.seal (sdgoij) 2013-05-18 15:56:52 -07:00
Robert Krimen
bdd28e5938 Revamp property mode bit fiddling (write, enumerate, configure) 2013-05-18 15:56:35 -07:00
Robert Krimen
adf21d0208 No rush to change the interface of Value.Export() 2013-05-15 19:30:39 -07:00
Robert Krimen
faaed09553 Change Export() to have new interface and slightly different behavior 2013-05-15 19:04:39 -07:00
Robert Krimen
15539ede6c Add Object.freeze (sdgoij) 2013-05-12 14:54:47 -07:00
Robert Krimen
7e2b4f2063 Rewrite of property handling to be more robust and compliant
* No more _stash
* Now using a "virtual table" system via _objectClass
* Make Array.concat GoArray compatible (via .isArray())

Fix #16
2013-05-12 14:14:51 -07:00
Robert Krimen
58e455b80f Mock location as UTC for date testing 2013-05-05 11:26:34 -07:00
Robert Krimen
d1d4d939ea Add Object.isSealed & Object.isFrozen 2013-05-05 10:35:32 -07:00
Robert Krimen
2e20275e07 Add check for testing against the release version of Go 2013-05-05 10:23:18 -07:00
Robert Krimen
696272f7d6 Fix Local/UTC conversion discrepancy in newDateTime 2013-05-05 09:18:16 -07:00
Robert Krimen
683e3956aa Add Object.isExtensible & Object.preventExtensions...
...and fix the deep implementation of defineOwnProperty
so that they can work (more or less) properly
2013-05-03 22:24:51 +02:00
Robert Krimen
2e0fe63a64 Fix: parse_statement.go:184: function ends without a return statement 2013-05-02 23:17:18 +02:00
Robert Krimen
6c5259a651 Add Object.toLocaleString 2013-05-02 21:06:22 +02:00
Robert Krimen
fb974ca5db Do not throw a TypeError when trying to set global, ignoreCase, source, etc. 2013-05-02 20:23:07 +02:00
Robert Krimen
596af0a836 Fix RegExp.prototype.toString .length & .prototype 2013-05-02 20:23:07 +02:00
Robert Krimen
bc84827b09 Fix RegExp.prototype.test .length & .prototype 2013-05-02 20:23:07 +02:00
Robert Krimen
fc569ab73a Fix RegExp.prototype.exec .length & .prototype 2013-05-02 20:23:07 +02:00
Robert Krimen
36a7419812 After a successful global RegExp.exec match, index shift the result 2013-05-02 20:23:07 +02:00
Robert Krimen
f9879057a6 Partially implement new Object(...) 2013-05-02 20:23:07 +02:00
Robert Krimen
78ab288e0a Another RegExp test 2013-05-02 20:23:07 +02:00
Robert Krimen
b078bacaf7 Set the prototype of Math to the global object prototype 2013-05-02 20:23:07 +02:00
Robert Krimen
b4a6286aa7 Use RegExp._RegExp.Flags when doing new RegExp(RegExp) 2013-05-02 20:23:07 +02:00
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