Commit Graph

63 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 071d8bd1ce
update 2021-09-10 19:13:42 +08:00
Li Haokun ef9b781961
security holes fixed 2021-08-19 17:54:36 +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 40b690b67b
update 2021-08-05 19:02:41 +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
ValKmjolnir 884b56ac09 bug fixed & raw string print 2021-07-21 00:20:25 +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 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 3c9a10d710 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 ab99d2d1ed change mcall to call->mcall&allow differen lvalue in assignment 2021-06-21 16:46:47 +08:00
Valk Richard Li 00c6e3b4fd nothing changed 2021-06-20 01:27:01 +08:00
Valk Richard Li cdf7b92a8e add statistical information 2021-06-19 00:32:10 +08:00
Valk Richard Li 0e979a6e7b bug fixed & delete operand vapp 2021-06-15 00:49:32 +08:00
Valk Richard Li 4f3ddf803a add tips 2021-06-13 01:01: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 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 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 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 144e6f45da gc changed to mark-sweep 2021-03-27 01:08:05 +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 64961877de Add props lib & bug fixed(op_ret in foreach/index got SIGSEGV) 2021-02-18 23:49:29 +08:00
Valk Richard Li 9c9bb52818 codegen will not generate 'jmp' if 'if' and 'elsif' is the last condition 2021-02-18 11:45:47 +08:00
Valk Richard Li 78ba0641a6 change the way of calling built-in functions
change std::map to struct array,use index to call built-in functions.this may be more efficient.
2021-02-14 17:36:42 +08:00
Valk Richard Li e2ee9cff4c update 2021-02-13 14:37:21 +08:00
Valk Richard Li 944f713ee9 update 2021-02-13 11:09:31 +08:00
Valk Richard Li 7329c70492 identifiers' name changed 2021-02-12 23:48:51 +08:00
Valk Richard Li 9474ac9ef0 update & bug fixed 2021-01-05 23:17:32 +08:00
Valk Richard Li bc64d530be update 2021-01-02 23:57:21 +08:00
Valk Richard Li ea5116e963 update 2020-12-29 19:09:20 +08:00
Valk Richard Li cc4e697246 bug fixed 2020-12-26 19:05:04 +08:00
Valk Richard Li 05800fe518 bug fixed 2020-12-25 13:22:57 +08:00
Valk Richard Li 19ce1c5f34 update 2020-12-15 21:13:22 +08:00
Valk Richard Li 9eb72f8754 update 2020-12-14 23:43:00 +08:00
Valk Richard Li d8ce203ab3 update 2020-12-12 19:58:43 +08:00
Valk Richard Li 71f501a323 update 2020-12-12 01:58:40 +08:00
Valk Richard Li a5825e0e92 update 2020-12-11 13:46:56 +08:00
Valk Richard Li 789300e5f6 update 2020-12-10 00:01:25 +08:00