Commit Graph

1176 Commits

Author SHA1 Message Date
ValKmjolnir 80cc8e9db7 closure bugs fixed 2021-08-17 01:18:35 +08:00
Li Haokun b2be386be8
update hexdump.nas 2021-08-13 15:10:20 +08:00
Li Haokun e4c598cae6
add hexdump.nas 2021-08-12 20:01:51 +08:00
Li Haokun 5fe6681b0d
update lexer 2021-08-12 19:00:17 +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
ValKmjolnir 638ec1c3a3 use same indentation 2021-08-09 21:30:18 +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
ValKmjolnir 5b6c78783e update README 2021-08-04 00:03:49 +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 d0616ef028 update 2021-08-01 22:37:42 +08:00
ValKmjolnir 91771297d3 add test file 2021-08-01 22:34:02 +08:00
ValKmjolnir 4e1a3c5f2d 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
ValKmjolnir df634cb1b2 update readme:difference between this and andy's interpreter 2021-08-01 01:54:14 +08:00
Li Haokun aa797142d1
update parser
one bug found, waiting to be fixed
2021-07-28 18:22:40 +08:00
Li Haokun 816be43a98
update 2021-07-24 19:59:56 +08:00
Li Haokun 9ebabfe737
fixed bug in nasal_parse 2021-07-21 17:38:11 +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 7a93f5b89b
update 2021-07-19 17:04:45 +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 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 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 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 dd144305da update test file 2021-06-14 00:27:00 +08:00
Valk Richard Li 4f3ddf803a add tips 2021-06-13 01:01:32 +08:00
Valk Richard Li de305d26ad fixed an error in README 2021-06-12 01:23:06 +08:00
Valk Richard Li 9f30f45774 Update README.md 2021-06-11 15:28:25 +08:00
Valk Richard Li 1ae47807eb Add command line parameters & chr supports extended ASCII 2021-06-11 15:16:06 +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 9f2c31149a bug fixed
fixed SIGSEGV when failed to load file in nasal_lexer::openfile
2021-06-06 19:17:02 +08:00
Valk Richard Li b25a1bc3f4 more efficient str2num 2021-06-05 20:42:58 +08:00
Valk Richard Li fd7677f94f 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 2e31a70406 Update README.md 2021-06-03 21:59:15 +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