Commit Graph

906 Commits

Author SHA1 Message Date
Li Haokun 284ff5abb6 fixed bug in nasal_parse 2021-07-21 17:38:11 +08:00
ValKmjolnir 26bbdcf463 bug fixed & raw string print 2021-07-21 00:20:25 +08:00
Li Haokun f72fb86912 show vm stack top's info when error occurs 2021-07-20 19:21:05 +08:00
Li Haokun 1a180ae01a update 2021-07-19 17:04:45 +08:00
Li Haokun d9d7a1edfc add trace back info 2021-07-16 17:18:13 +08:00
ValKmjolnir 5de65e584d prepare for debugger 2021-07-16 02:17:53 +08:00
ValKmjolnir 5c958d7229 update 2021-07-14 01:24:15 +08:00
ValKmjolnir d7ba29e02c delete slice_stack 2021-07-07 14:46:46 +08:00
ValKmjolnir e974468881 add const compare instructions 2021-07-03 15:22:23 +08:00
ValKmjolnir 81131520d7 add instruction & changes in codegen
add some instructions that execute const values.
the first symbol called in assignment will use op_load instead of op_meq,op_pop to assign.
2021-06-29 17:18:05 +08:00
ValKmjolnir ee9afe1cf1 change instruction dispatch to computed-goto
bug fixed
prepare for version 7.0
2021-06-26 14:53:10 +08:00
ValKmjolnir 855e0e441f avoid unnecessary deep copy by using rvalue ref
and test file update.
bug fixed in test/lexer.nas
v6.5
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
ValKmjolnir f0565c7de6 change mcall to call->mcall&allow differen lvalue in assignment 2021-06-21 16:46:47 +08:00
Valk Richard Li 0f298244a2 update 2021-06-21 01:02:09 +08:00
Valk Richard Li 40a1189b18 nothing changed 2021-06-20 01:27:01 +08:00
Valk Richard Li b9aa7f5db2 add statistical information 2021-06-19 00:32:10 +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 411c2e5c4c add tips 2021-06-13 01:01:32 +08:00
Valk Richard Li 1d3c4b0843 fixed an error in README 2021-06-12 01:23:06 +08:00
Valk Richard Li 19517e7bfc Update README.md 2021-06-11 15:28:25 +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 166fe32839 front end optimization&stack overflow prompt
change parameter type to avoid unnecessary copies of string.
change stack depth from 65536<<4 to 16+(65536<<2).
now you could know stack overflow when it happens
2021-06-07 23:53:43 +08:00
Valk Richard Li a3dbaebfd8 bug fixed
fixed SIGSEGV when failed to load file in nasal_lexer::openfile
2021-06-06 19:17:02 +08:00
Valk Richard Li a0ff523229 more efficient str2num 2021-06-05 20:42:58 +08:00
Valk Richard Li 27ab63024c update README.md(some history of this project)
AND a question of admins' brains of gitee
2021-06-05 17:15:07 +08:00
Valk Richard Li d149d7ad77 Update README.md 2021-06-03 21:59:15 +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 b2e85de7a7 bug fixed
a gc bug which causes  fatal error.
add member value collect to make sure that nasal_val is not collected repeatedly.
use builtin_alloc in builtin function to avoid incorrect collection of value in use(gc_alloc).
change free_list to free_list[vm_type_size] to avoid too many calls of new/delete(but seems useless?)
but the most important thing is fixing this bug.
2021-05-31 19:10:59 +08:00
Valk Richard Li a499c75932 bug fixed
add operand op_offset to make sure arguments are loaded at correct places,before this commit,arguments are not loaded from a correct offset,which will cause SIGSEGV when calling a function that has complex closure
2021-05-17 21:15:57 +08:00
Valk Richard Li 20cfbfecd9 add license & other changes
parser recognizes syntax errors more accurately.
change some for loop to standard c++11 for(auto iter:obj)
add MIT license
change info in README.md
2021-05-04 17:39:24 +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 d51465cc82 change function of vapp & README update 2021-04-03 23:47:14 +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
Valk Richard Li 4202c2081e change id name & add test file 2021-03-30 00:12:48 +08:00
Valk Richard Li 6473b527a1 bug fixed 2021-03-28 17:39:24 +08:00
Valk Richard Li a990fb606a gc changed to mark-sweep 2021-03-27 01:08:05 +08:00
Valk Richard Li 0d662ab498 update 2021-03-11 23:18:04 +08:00
Valk Richard Li ca27c5545a add constant table in vm 2021-03-08 19:45:33 +08:00
Valk Richard Li 5fba496453 update test files and prepare the release of v5.0 v5.0 2021-03-07 16:33:43 +08:00
Valk Richard Li 6187ca1d8e delete op_entry 2021-03-04 15:53:34 +08:00
Valk Richard Li e8b8e53015 change test files 2021-03-03 09:20:42 +08:00
Valk Richard Li 2d0a89a210 add test files 2021-03-03 01:09:57 +08:00
Valk Richard Li f3370ef0f7 change map to unordered_map 2021-03-01 15:54:58 +08:00