Steven Hartland
9297a9abe4
feat: add github action tests and linting ( #418 )
...
Leverage github actions for tests and linting.
This includes fixing a bunch of issues highlighted by golangci
including:
* Dead code.
* Ineffectual assigns.
* Goto warnings.
* Nil return err.
* Reused literal strings.
* Test parameter order.
Also:
* Setup clog.
2021-09-27 16:19:28 +01:00
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
709a0aa7ff
Value.string(), .float64(), .bool(), etc.
2014-06-06 21:29:40 -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
87a212ca60
Fix for get/set: undefined is actually a getter/setter
2014-02-14 21:47:50 -08:00
Robert Krimen
9c45463cd6
Preserve existing get/set unless explicitly undefined
2014-02-14 19:46:37 -08:00
Robert Krimen
57e0a468ac
Fix a few aspects of accessor properties
2014-02-13 21:30:26 -08:00
Tim Jurcka
dd88ce83b8
Call getter/setter if property is AccessorDescriptor
...
This fixes #36
This fixes #56
2014-02-12 21:52:42 -08:00
Robert Krimen
c3cd59909c
Provide early warning of missing functionality (set:/get:)
...
This is a bandaid for #56
2014-02-10 21:15:40 -08:00
Robert Krimen
f9e07770bd
[[Value]] should NOT be set to Undefined if missing
2013-07-21 17:48:42 -07:00
Robert Krimen
4ebf6416d0
Fix Uint32 Array/String indexing
...
Also, a bunch of toValue_* streamlining
And maybe a few miscellaneous tweaks
2013-06-22 15:49:22 +02:00
Robert Krimen
bdd28e5938
Revamp property mode bit fiddling (write, enumerate, configure)
2013-05-18 15:56:35 -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
20d2e8bba6
gofmt
...
Ugh.
2013-01-25 09:59:42 -08:00
Robert Krimen
8f2a1c60e5
Default a descriptor value to undefined if writable is given
2012-12-26 17:25:00 -08:00
Robert Krimen
ce6f552b87
Corect spelling of configurable, writable
...
From configureable, writeable
And enumerarable?
2012-10-27 14:25:29 -07:00
Robert Krimen
491805071f
Add toPropertyDescriptor, Object.getOwnPropertyDescriptor
2012-10-27 14:18:07 -07:00
Robert Krimen
9d6d2638c1
Move toPropertyDescriptor into property.go
2012-10-27 13:22:58 -07:00
Robert Krimen
6f5ca7cc0d
Beef up _property, remove _defineProperty
...
Remove uneeded _valueProperty
Rename to propertyMode_{write,enumerate,configure}
.Can* => writeable, enumerable, configureable
Privatize _property
Get rid of _defineProperty
2012-10-27 08:59:38 -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
4a8c7ffc00
Initial commit
2012-10-05 18:47:53 -07:00