Commit Graph

30 Commits

Author SHA1 Message Date
ValKmjolnir bf780514e6 add constant string calculation in optimizer 2022-02-01 21:20:36 +08:00
ValKmjolnir eaa54035ff change name of enum:ast_hashmember->ast_pair, ast_new_iter->ast_iter
change ast_hashmember to ast_pair is because this type in fact is the same as std::pair<std::string,nasal_ref> in C++
2022-01-31 17:22:44 +08:00
ValKmjolnir 4def93b4ad bug fixed in nasal_vec::print and nasal_hash::print
if vec's or hash's size is 0, a bug will occur because ++depth. now the ++depth has been put behind the size()
2022-01-29 19:51:43 +08:00
ValKmjolnir 630c99c39a optimize codes 2022-01-16 22:48:00 +08:00
ValKmjolnir 46716620e3 add test file 'turingmachine.nas' & change output format of ast & bug fixed 2021-12-28 20:23:47 +08:00
ValKmjolnir cd08b2d1bb change code structure 2021-11-02 22:44:42 +08:00
ValKmjolnir fd0d836c03 add io lib & bug fixed 2021-10-27 23:05:25 +08:00
ValKmjolnir 183446d32a bug fixed 2021-10-26 22:34:02 +08:00
ValKmjolnir 540aeb73f4 optimize nasal_ast and fix bug in opr_slc2 2021-10-20 20:54:23 +08:00
ValKmjolnir d4a9412947 optimize code structure 2021-10-16 21:08:57 +08:00
ValKmjolnir 577546763f change function name and cli format 2021-10-14 23:22:28 +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
ValKmjolnir df634cb1b2 update readme:difference between this and andy's interpreter 2021-08-01 01:54:14 +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 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
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 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 125fc8a9fe bug fixed & test file changes
compare operators now run more efficiently.
2021-03-31 20:59:13 +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 996ac59c79 update parser to LL(1) 2021-02-13 13:28:20 +08:00
Valk Richard Li 7329c70492 identifiers' name changed 2021-02-12 23:48:51 +08:00
Valk Richard Li bc64d530be update 2021-01-02 23:57:21 +08:00
Valk Richard Li 9eb72f8754 update 2020-12-14 23:43:00 +08:00
Valk Richard Li 73c9f98f4f update 2020-12-14 00:10:31 +08:00
Valk Richard Li f336e5c3ae update 2020-11-30 23:54:32 +08:00
Valk Richard Li fd8d3acfed update 2020-11-09 00:26:15 +08:00
Valk Richard Li e8341c7b06 change project structure
version 3.0
2020-10-23 14:53:04 +08:00