Commit Graph

52 Commits

Author SHA1 Message Date
ValKmjolnir d71b4f09e2 prepare for version 8.0 2021-10-08 15:32:18 +08:00
Li Haokun 618ce59233
bad access bug fixed 2021-09-13 19:55:03 +08:00
Li Haokun ef9b781961
security holes fixed 2021-08-19 17:54:36 +08:00
ValKmjolnir 80cc8e9db7 closure bugs fixed 2021-08-17 01:18:35 +08:00
Li Haokun 35fc848672
fully functional closure 2021-08-11 14:54:17 +08:00
Li Haokun e3f3bd7387
update readme 2021-08-10 17:55:49 +08:00
Li Haokun 90ac468aa9
update 2021-08-09 19:13:39 +08:00
ValKmjolnir 65dfef0a33 update 2021-08-09 01:02:27 +08:00
Li Haokun 76a2548e95
update 2021-08-06 18:57:06 +08:00
Li Haokun 40b690b67b
update 2021-08-05 19:02:41 +08:00
Li Haokun 2b17f3d702
update debug info 2021-08-04 14:32:56 +08:00
Li Haokun fa618eb97f
variables can be used before definition
change program to command line
change trace back info
change print function of nasal_vec and nasal_hash
2021-08-03 18:55:11 +08:00
Li Haokun 816be43a98
update 2021-07-24 19:59:56 +08:00
ValKmjolnir 884b56ac09 bug fixed & raw string print 2021-07-21 00:20:25 +08:00
Li Haokun 61677101e4
show vm stack top's info when error occurs 2021-07-20 19:21:05 +08:00
Li Haokun 9fe7a86a3b
add trace back info 2021-07-16 17:18:13 +08:00
ValKmjolnir 9da029b8fe prepare for debugger 2021-07-16 02:17:53 +08:00
ValKmjolnir 8b8e72c879 update 2021-07-14 01:24:15 +08:00
ValKmjolnir 590c595522 delete slice_stack 2021-07-07 14:46:46 +08:00
ValKmjolnir 57d6bcdc52 add const compare instructions 2021-07-03 15:22:23 +08:00
ValKmjolnir 0b2fe61e6e 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 706659ba3d change instruction dispatch to computed-goto
bug fixed
prepare for version 7.0
2021-06-26 14:53:10 +08:00
ValKmjolnir fd57e9a47c performance optimization of vm/lex/parse/test 2021-06-24 00:26:26 +08:00
ValKmjolnir ab99d2d1ed change mcall to call->mcall&allow differen lvalue in assignment 2021-06-21 16:46:47 +08:00
Valk Richard Li ae0dae5956 update 2021-06-21 01:02:09 +08:00
Valk Richard Li 00c6e3b4fd nothing changed 2021-06-20 01:27:01 +08:00
Valk Richard Li 0e979a6e7b bug fixed & delete operand vapp 2021-06-15 00:49:32 +08:00
Valk Richard Li 3deea632f8 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 b25a1bc3f4 more efficient str2num 2021-06-05 20:42:58 +08:00
Valk Richard Li 8e29a3ec5b 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 a68bf85f04 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 aae9395d66 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 a463af53b7 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 c5f4736984 change scope from unordered_map to vector 2021-04-19 19:12:41 +08:00
Valk Richard Li 1a233fbe15 update 2021-04-12 13:21:13 +08:00
Valk Richard Li 0700ce14f7 change function of vapp & README update 2021-04-03 23:47:14 +08:00
Valk Richard Li c88620920b add stl & more efficient scope 2021-04-02 22:19:29 +08:00
Valk Richard Li 125fc8a9fe bug fixed & test file changes
compare operators now run more efficiently.
2021-03-31 20:59:13 +08:00
Valk Richard Li b06e1bb5dd add static symbol check & test file update 2021-03-30 15:55:38 +08:00
Valk Richard Li c7316e9780 change id name & add test file 2021-03-30 00:12:48 +08:00
Valk Richard Li be1bcdfe2c bug fixed 2021-03-28 17:39:24 +08:00
Valk Richard Li 144e6f45da gc changed to mark-sweep 2021-03-27 01:08:05 +08:00
Valk Richard Li 569d5c6c6a update 2021-03-11 23:18:04 +08:00
Valk Richard Li 7087c67d79 add constant table in vm 2021-03-08 19:45:33 +08:00
Valk Richard Li f60f674845 delete op_entry 2021-03-04 15:53:34 +08:00
Valk Richard Li a421470715 change map to unordered_map 2021-03-01 15:54:58 +08:00
Valk Richard Li 79dc13f419 update 2021-02-27 22:45:51 +08:00
Valk Richard Li 64961877de Add props lib & bug fixed(op_ret in foreach/index got SIGSEGV) 2021-02-18 23:49:29 +08:00
Valk Richard Li 02148f4766 bug fixed & more efficient function call
fixed a bug when different hash calling the same function,'me' will be set to the latest called hash's address.
changed the way of pushing the scope to the stack by copying a new scope from the function's scope address.
use map as the nasal_scop instead of list<map>,it'll be more efficient.
2021-02-17 19:31:44 +08:00
Valk Richard Li 767711c93a change identifier name to avoid misunderstanding 2021-02-15 15:29:55 +08:00