Daniel Kang
336fbc30e5
some performance optimization in VM
2019-01-20 08:32:12 -08:00
Daniel Kang
88dd0224d5
use atomic.Load/Store to avoid data race
2019-01-20 06:33:22 -08:00
Mike Bazuin
fae85000cf
Convert returns second argument Object as it self in case of failure of conversion of first argument
...
objects/builtin_convert.go
- Changed type check of in case of args[0] failure to always return
args[1] if set
runtime/vm_builtin_test.go:
- Changed tests according to changes in objects/builtin_convert.go
2019-01-18 23:29:04 +01:00
Mike Bazuin
a747c98fb5
Builtin converts now take default values
...
objects/builtin_convert.go: Added defaults to all builtin convert functions except
bool as this one returns false for undefined, instead of undefined.
runtime/vm_builtin_test.go: Added tests for checking default value
behaviour for builtin convert funcs
2019-01-18 22:21:42 +01:00
Mike Bazuin
b4a2da8a30
runtime/vm_builtin_test.go: Added builtin bytes convert test
2019-01-18 22:21:35 +01:00
Daniel Kang
5164d1de9f
add 'exec' module
2019-01-18 10:17:24 -08:00
Daniel Kang
a8d838ad3e
Compile can take custom stdlibs
2019-01-18 09:19:45 -08:00
Daniel Kang
8cad04841e
add os File functions; add Bytes type
2019-01-18 01:43:46 -08:00
Daniel Kang
3f55a6b5b0
Modules ( #5 )
...
Implement module imports
2019-01-17 01:56:05 -08:00
Daniel Kang
8171d58071
Error Object ( #4 )
...
add error expression and error object
2019-01-16 12:23:20 -08:00
Daniel Kang
b79fd4f7ef
Fix lint issues ( #2 )
...
* addressing golint issues
* fix all lint issues.
2019-01-14 22:24:33 -08:00
Daniel Kang
32df2862b5
remove unnecessary function calls in VM
2019-01-14 04:32:09 -08:00
Daniel Kang
dc16c9abb2
update tests for index/slice operators
2019-01-14 04:26:20 -08:00
Daniel Kang
de70f7c40d
trying to optimize VM by cutting some repeated codes
2019-01-13 15:21:19 -08:00
Daniel Kang
ca128af33b
reduce number of memory allocation in object binary operators
2019-01-13 14:24:39 -08:00
Daniel Kang
967ed03ccc
fix a bug in tail-call optimization code
2019-01-13 02:24:32 -08:00
Daniel Kang
b802132c94
remove VM.Stack() function
2019-01-11 21:50:23 -08:00
Daniel Kang
27438eea6f
update directory package structure
2019-01-11 02:27:28 -08:00