Commit graph

16 commits

Author SHA1 Message Date
Daniel
e93f6f6325
limit max object allocations (#129)
- add object.NumObjects()
- add object allocation limit in VM
- delete objects.Break, objects.Continue, objects.ReturnValue
- add Script.SetMaxAllocs()
- update sandbox documentation
- add some tests
- remove duplicate values in compiled constants (fixes #96)
- option to limit the maximum number of objects in compiled bytecode constants
2019-03-06 17:20:05 -08:00
Daniel
3500c686b3
Improvements on compiler/VM error reporting (filename:line:col)
- add type infos to VM error messages
- add 'Name' to UserFunction objects 
- add 'expectErrorString' to VM tests
- replace vm.expectError() with vm.expectErrorString() to make it more explicit
- add source map info to VM error messages
- optimization in function calls
- add file/line/col info to compiler errors
- change stdlib module to be loaded from VM (instead of compiler) so they can be properly loaded after the source is compiled into binary
- VM can take builtin modules optionally
2019-02-20 16:26:11 -08:00
Daniel Kang
eda0495f30 Fix several module-related issues 2019-02-02 22:22:40 -08:00
Daniel Kang
378bf510d3 add Time type; add is_array, is_immutable_array, is_map, is_immutable_map, is_time, time builtin function 2019-01-29 16:01:14 -08:00
Daniel Kang
69a703bea2 text module: regex functions (re_match, re_find, re_split, re_replace) 2019-01-28 18:30:26 -08:00
Daniel Kang
85da0cdc24 force using TrueValue, FalseValue, UndefinedValue 2019-01-28 13:09:40 -08:00
Daniel Kang
85001be9b8 implement immutable array and map 2019-01-25 14:54:58 -08:00
Daniel Kang
8cad04841e add os File functions; add Bytes type 2019-01-18 01:43:46 -08:00
Daniel Kang
44c55ea296 add some more os module functions, add more built-int functions 2019-01-17 21:23:20 -08:00
Daniel Kang
8171d58071
Error Object (#4)
add error expression and error object
2019-01-16 12:23:20 -08:00
Daniel Kang
e1e0e0cb24 fix golint, ineffectassign issues and add some more tests 2019-01-15 10:14:16 -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
dab498651a add tests for Object.BinaryOp 2019-01-14 05:22:28 -08:00
Daniel Kang
27438eea6f update directory package structure 2019-01-11 02:27:28 -08:00
Daniel Kang
53af0d6328 move file and fileset to source package 2019-01-11 01:16:34 -08:00
Daniel Kang
2c3282da21 initial commit 2019-01-08 23:17:42 -08:00