Commit Graph

64 Commits

Author SHA1 Message Date
ValKmjolnir f16259b2da update README & bug fixed 2022-02-13 16:10:02 +08:00
ValKmjolnir 0d5b0fa57d now local values are stored on stack. upvalue is generated when creating a new function in local scope.
may include some bugs inside. but all test files has passed the test so i decide to push it.
2022-02-12 23:12:30 +08:00
ValKmjolnir 3ca42d1fd9 update test/calc.nas & print function of nasal_vec/nasal_hash 2022-02-11 17:04:27 +08:00
ValKmjolnir 6908e509ac add notes in lib.nas & add runtime.gc() & add total instruction count in '-o'. 2022-02-09 15:53:09 +08:00
ValKmjolnir 87f2b78fc8 update/optimize test files 2022-02-07 23:41:50 +08:00
ValKmjolnir 54da9e4ee1 optimize test file & little update. 2022-02-06 19:55:45 +08:00
ValKmjolnir 6812a389dc update new test data 2022-01-24 15:19:27 +08:00
ValKmjolnir 6c3e5e6a02 add optimizer
optimizer now does one work: calculate const number before generating bytecode
2022-01-22 00:41:08 +08:00
ValKmjolnir a51b7fe11a optimize codes 2022-01-16 22:48:00 +08:00
ValKmjolnir 2ff88b7073 add test file 'turingmachine.nas' & change output format of ast & bug fixed 2021-12-28 20:23:47 +08:00
ValKmjolnir 1ae354c0cf lexer,parser,import,codegen use the same error module. 2021-12-23 21:15:50 +08:00
ValKmjolnir 82181b7af4 add debugger framework
with function:backtrace,run,help,show global/local/upvalue,exit
2021-12-20 21:33:22 +08:00
ValKmjolnir e706214854 bug fixed & add os.platform 2021-12-08 18:46:32 +08:00
ValKmjolnir e1d5ab2da5 add unix.isdir and unix.isfile 2021-11-15 22:47:52 +08:00
ValKmjolnir bc9039dd37 change code structure 2021-11-02 22:44:42 +08:00
ValKmjolnir b131a3ea9e add io lib & bug fixed 2021-10-27 23:05:25 +08:00
ValKmjolnir a7b1851967 optimize code structure 2021-10-16 21:08:57 +08:00
ValKmjolnir 645a652830 change function name and cli format 2021-10-14 23:22:28 +08:00
ValKmjolnir 321a762612 complete simple tutorial 2021-10-14 13:42:07 +08:00
ValKmjolnir 414c9c7487 change output format of information of bytecodes 2021-10-13 22:59:15 +08:00
ValKmjolnir b77d9a48fb fully functional closure & add benchmark 2021-10-10 14:29:23 +08:00
ValKmjolnir b4f55f0d01 prepare for version 8.0 2021-10-08 15:32:18 +08:00
Li Haokun 52fbd729cc bad access bug fixed 2021-09-13 19:55:03 +08:00
Li Haokun 5ed1b63143 update 2021-09-10 19:13:42 +08:00
Li Haokun 6f6383f4fc add result.nas 2021-09-01 19:14:03 +08:00
Li Haokun e7afc86d97 add isnan 2021-08-27 17:43:01 +08:00
Li Haokun 6e8999b695 nothing changed 2021-08-24 19:34:52 +08:00
Li Haokun 1982ab6b8e security holes fixed 2021-08-19 17:54:36 +08:00
ValKmjolnir b2f09ec855 closure bugs fixed 2021-08-17 01:18:35 +08:00
Li Haokun f07e7b52df update hexdump.nas 2021-08-13 15:10:20 +08:00
Li Haokun 894e280ef4 add hexdump.nas 2021-08-12 20:01:51 +08:00
Li Haokun 331e0e1728 fully functional closure 2021-08-11 14:54:17 +08:00
ValKmjolnir a1adb5b948 add test file 2021-08-01 22:34:02 +08:00
Li Haokun 284ff5abb6 fixed bug in nasal_parse 2021-07-21 17:38:11 +08:00
ValKmjolnir e974468881 add const compare instructions 2021-07-03 15:22:23 +08:00
ValKmjolnir 855e0e441f avoid unnecessary deep copy by using rvalue ref
and test file update.
bug fixed in test/lexer.nas
2021-06-24 22:10:08 +08:00
ValKmjolnir a734b99beb performance optimization of vm/lex/parse/test 2021-06-24 00:26:26 +08:00
Valk Richard Li 0f298244a2 update 2021-06-21 01:02:09 +08:00
Valk Richard Li 05fcacde37 bug fixed & delete operand vapp 2021-06-15 00:49:32 +08:00
Valk Richard Li d9904774fc update test file 2021-06-14 00:27:00 +08:00
Valk Richard Li 1d3c4b0843 fixed an error in README 2021-06-12 01:23:06 +08:00
Valk Richard Li 1cd627d9c7 Add command line parameters & chr supports extended ASCII 2021-06-11 15:16:06 +08:00
Valk Richard Li a3d629a08e bug fixed & more efficient callfv
I changed callfv's way of calling a function with arguments in vm_vec.
now callfv fetches arguments from val_stack directly,so it runs test/fib.nas from 2.4s to 1.9s.

delete operand callf,add operands callfv & callfh.

also,i check val_stack's top to make sure there is not a stack overflow.
2021-06-03 21:49:31 +08:00
Valk Richard Li 6651fccbe8 parser reports syntax error accurately
still need improvement
2021-05-04 01:13:53 +08:00
Valk Richard Li 2405bada81 change scope from unordered_map to vector 2021-04-19 19:12:41 +08:00
Valk Richard Li 3c89942654 update 2021-04-12 13:21:13 +08:00
Valk Richard Li 0af48f7f3f add test file & update README 2021-04-04 23:35:13 +08:00
Valk Richard Li 1f6e1a647e add stl & more efficient scope 2021-04-02 22:19:29 +08:00
Valk Richard Li e10517b741 bug fixed & test file changes
compare operators now run more efficiently.
2021-03-31 20:59:13 +08:00
Valk Richard Li 7f191f353e add static symbol check & test file update 2021-03-30 15:55:38 +08:00