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

25 Commits

Author SHA1 Message Date
Robert Krimen
7721396b67 Fix Date tests to always mock UTC 2014-04-13 15:07:29 -07:00
Robert Krimen
ad8a97c028 New parser
* Faster, more straightforward, etc.
* More advanced object literals (get ..., set ...)
* More tests using JavaScript from the wild (http://cdnjs.com/)
2014-04-10 20:42:25 -07:00
Robert Krimen
21cd663185 Allow .bind to bind [[Construct]] 2014-01-20 18:04:34 -08:00
Robert Krimen
73b83020ce Add caller and arguments properties to functions via .bind 2014-01-20 13:25:41 -08:00
Robert Krimen
4fd197197d Add test for .binding something that is not callable 2014-01-20 13:13:44 -08:00
Robert Krimen
2d6125ee2c Fix .length property of functions via .bind 2014-01-20 12:58:00 -08:00
Robert Krimen
a36c19873f Fix Function.prototype.call .length 2014-01-20 12:42:23 -08:00
Robert Krimen
dace228dc8 Remove superfluous test 2014-01-20 12:32:08 -08:00
Robert Krimen
975b815b58 Fix: Function.prototype.toString (Should not be generic) 2014-01-20 12:27:05 -08:00
Robert Krimen
7d9809b2ec Fix: Function(null)
Should throw a SyntaxError for any keyword
2014-01-20 11:47:36 -08:00
Robert Krimen
6daecbf17e Fix: Function("z;x", ...)
Should throw a SyntaxError
2014-01-20 11:27:37 -08:00
Robert Krimen
514ac5ab9c Fix parsing: body, parameters => parameters, body
We were parsing in revese order...
2014-01-20 10:59:56 -08:00
Robert Krimen
e40549dbd2 Fix: Function("abc, def", "ghi", ...) 2014-01-20 10:30:02 -08:00
Robert Krimen
89a849c136 Fix: "[object Object]" (Should be a SyntaxError) 2014-01-20 10:29:41 -08:00
Robert Krimen
4860ef573b Fix Function.bind to use newBoundFunction...
...instead of newBoundFunctionObject

Basically, newBoundFunctionObject returns an incomplete object (without a prototype, __prototype__, etc.)
2014-01-20 08:27:19 -08:00
Robert Krimen
c47cf7be6e Improve arguments property handling
Also, fix an issue with double enumeration of arguments
2014-01-19 21:08:05 -08:00
Robert Krimen
ea621687a4 Add Otto.Copy() 2013-07-14 14:20:01 -07:00
Robert Krimen
81de6c8f02 Fix writable/enumerable/configurable of *.prototype to be false
Number, String, Array, RegExp, Error, etc.
2013-06-15 17:38:16 -07:00
Robert Krimen
70045edc65 Fix Function.prototype to have a length property 2013-06-15 11:01:57 -07:00
Robert Krimen
9184233705 Bundle terst dependency (github.com/robertkrimen/terst) 2013-04-15 10:20:34 -07:00
Robert Krimen
fef122900f Add Function.bind 2013-03-01 13:08:10 -08:00
Robert Krimen
03cd7ef8f7 Functions declared in a function should replace parameters 2013-02-24 14:28:16 -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
809a0a0ba6 Split tests out of one big massive file 2013-02-05 08:56:08 -08:00