Commit Graph

56 Commits

Author SHA1 Message Date
ValKmjolnir b131a3ea9e add io lib & bug fixed 2021-10-27 23:05:25 +08:00
ValKmjolnir 95451490ca bug fixed 2021-10-26 22:34:02 +08:00
ValKmjolnir 101714986d optimize nasal_ast and fix bug in opr_slc2 2021-10-20 20:54:23 +08:00
ValKmjolnir d7cffc76bd update 2021-10-16 23:36:43 +08:00
ValKmjolnir a7b1851967 optimize code structure 2021-10-16 21:08:57 +08:00
ValKmjolnir a71b08a927 update 2021-10-15 22:21:57 +08:00
ValKmjolnir 645a652830 change function name and cli format 2021-10-14 23:22:28 +08:00
Li Haokun 52fbd729cc bad access bug fixed 2021-09-13 19:55:03 +08:00
ValKmjolnir 143a59c735 update 2021-08-09 01:02:27 +08:00
ValKmjolnir a1adb5b948 add test file 2021-08-01 22:34:02 +08:00
ValKmjolnir ead5ca32b3 syntax bug fixed
syntax like:
var f=func(){}
(var a,b,c)=(1,2,3);
will be incorrectly recognized like:
var f=func(){}(var a,b,c)

this bug is fixed now.
2021-08-01 02:11:27 +08:00
Li Haokun d1cffa76c6 update parser
one bug found, waiting to be fixed
2021-07-28 18:22:40 +08:00
Li Haokun 284ff5abb6 fixed bug in nasal_parse 2021-07-21 17:38:11 +08:00
Li Haokun 1a180ae01a update 2021-07-19 17:04:45 +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 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
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 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 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 a0ff523229 more efficient str2num 2021-06-05 20:42:58 +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 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 e10517b741 bug fixed & test file changes
compare operators now run more efficiently.
2021-03-31 20:59:13 +08:00
Valk Richard Li a990fb606a gc changed to mark-sweep 2021-03-27 01:08:05 +08:00
Valk Richard Li f3370ef0f7 change map to unordered_map 2021-03-01 15:54:58 +08:00
Valk Richard Li afef865f69 bug fixed 2021-02-13 23:57:53 +08:00
Valk Richard Li 805efbd104 update 2021-02-13 14:37:21 +08:00
Valk Richard Li 92aaef55d2 update parser to LL(1) 2021-02-13 13:28:20 +08:00
Valk Richard Li 468ad6157f update 2021-02-13 11:09:31 +08:00
Valk Richard Li 4112a05a83 identifiers' name changed 2021-02-12 23:48:51 +08:00
Valk Richard Li ee5f9519fe update 2021-02-10 00:12:22 +08:00
Valk Richard Li dfb537bbdc update 2021-01-23 17:57:05 +08:00
Valk Richard Li 14c43c6a42 update & bug fixed 2021-01-05 23:17:32 +08:00
Valk Richard Li 44327224ed update 2021-01-05 01:55:17 +08:00
Valk Richard Li e797766950 bug fixed 2020-12-25 13:22:57 +08:00
Valk Richard Li cfc9a97144 update 2020-12-19 23:47:04 +08:00
Valk Richard Li 1c875cd855 update 2020-12-19 21:02:02 +08:00
Valk Richard Li a086af4c33 update 2020-12-15 13:00:24 +08:00
Valk Richard Li 26cb74193d update 2020-12-14 00:10:31 +08:00
Valk Richard Li e162727d3b update 2020-12-06 21:07:40 +08:00
Valk Richard Li 6b94345a4d update 2020-11-29 00:54:54 +08:00
Valk Richard Li fbd73c07fe update 2020-11-26 00:03:05 +08:00
Valk Richard Li 2c16b47a13 update 2020-11-25 00:05:15 +08:00
Valk Richard Li 931e6bae0b update 2020-11-20 19:15:12 +08:00