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

19 Commits

Author SHA1 Message Date
Robert Krimen
e6768252c2 Improve error reporting
* Delay entering global scope on code evaluation, not runtime creation

This fixes #66
2014-06-12 21:27:32 -07:00
Robert Krimen
918abeb8d8 The zero value of Value is now defined to be undefined
Previously, it was a publically accessible but invalid value (valueEmpty).

* Deprecate internal use of UndefinedValue(), NullValue(), FalseValue(), TrueValue()
* Guard against Empty, Result, Reference values from escaping the package
2014-05-28 21:23:32 -07:00
Robert Krimen
9cd045ef04 Simplification & refactor of (parts of) the runtime
* Proper lowercasing for internal stuff
* *Environment => *_stash
* ExecutionContext => _scope
* Simpler & shallower call/construct mechanics
* Remove unnecessary fields & methods
* Better scoping (no more stack): []*_scope => _scope.outer
* Some speed improvements

In preparation for #66
2014-05-27 22:05:35 -07:00
Robert Krimen
bf7b16f4a3 Add internal compilation step
* Streamline what we get from "otto/parser"
* Get rid of some "otto/parser" cruft
* FunctionExpression => FunctionLiteral
* The debugger statement (debugger) should do nothing (not panic)
* Fix aspects of function expression call evaluation
2014-04-19 14:05:51 -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
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
c5f05dd873 Rework _reference interface to correspond to ECMA more closely 2013-02-25 13:26:12 -08:00
Robert Krimen
20d2e8bba6 gofmt
Ugh.
2013-01-25 09:59:42 -08:00
Robert Krimen
0498f06be0 Fix trying to delete non-reference 2012-11-14 11:09:52 -08:00
Robert Krimen
5f407353c2 Implementation (and use) of _declarativeEnvironment
No longer masquerading via _objectEnvironment
2012-11-05 17:14:56 -08:00
Robert Krimen
23501072fc Move getIdentifierReference 2012-11-05 15:35:01 -08:00
Robert Krimen
7ab5365515 Pass back result of "delete ..." (true or false) 2012-11-05 13:46:54 -08:00
Robert Krimen
8f8534ae3f _argumentReference => _propertyReference 2012-11-05 13:39:33 -08:00
Robert Krimen
efc94517dd _objectReference => _propertyReference 2012-11-05 13:33:29 -08:00
Robert Krimen
5679347c88 Take out (unused?) _primitiveReference 2012-11-05 13:31:18 -08:00
Robert Krimen
0891542e28 Rename _referenceBase => _reference_ 2012-10-27 14:33:51 -07:00
Robert Krimen
3c93384f5c Cleanup of stash, property, and object
Use octal to designate write/enumerate/configure (experimental)
Move extensibility responsibility into the stash
Rename propertyStash => objectStash (be congruent with arrayStash, etc.)
Get rid of a bunch of useless methods
Privatize everything ([A-Z] => [a-z_])
gofmt
2012-10-26 15:47:19 -07:00
Robert Krimen
ade6a169be Partially fix ReferenceError origin reporting 2012-10-09 17:19:29 -07:00
Robert Krimen
4a8c7ffc00 Initial commit 2012-10-05 18:47:53 -07:00