ValKmjolnir
980350d70a
prepare for function-call optimization
2022-02-12 18:03:50 +08:00
ValKmjolnir
0ccd3c9bd0
update test/calc.nas & print function of nasal_vec/nasal_hash
2022-02-11 17:04:27 +08:00
ValKmjolnir
3e7ba4d774
little update
2022-02-10 22:20:18 +08:00
ValKmjolnir
a176022840
add notes in lib.nas & add runtime.gc() & add total instruction count in '-o'.
2022-02-09 15:53:09 +08:00
ValKmjolnir
24a1e39ad3
add garbage collector and memory allocator info. use '-d' to activate this function.
2022-02-08 23:40:52 +08:00
ValKmjolnir
2a85e92d4a
optimize test file & little update.
2022-02-06 19:55:45 +08:00
ValKmjolnir
92646840e4
reuse codes in nasal_vec::print and nasal_hash::print
...
now they all use nasal_ref::print
2022-02-05 23:55:56 +08:00
ValKmjolnir
c55ce758ed
change increment arguments to a more efficiency level & change gc.nil, gc.one, gc.zero to constant nil, one, zero
2022-02-04 01:51:30 +08:00
ValKmjolnir
aa301aefc3
change increment argument in nasal_gc, because new vm doesn't need to alloc new objects frequently.
...
vm_str 2048 -> 512
vm_func 1024 -> 512
vm_vec 8192 -> 512
2022-02-03 22:43:51 +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
5a80258d20
bug fixed & add os.platform
2021-12-08 18:46:32 +08:00
ValKmjolnir
aa191a9feb
delete ret stack/ add math.lg
...
now return address is stored on value stack
2021-12-02 22:23:22 +08:00
ValKmjolnir
b8ef3cf6b6
delete op_cntpop & counter stack
...
now the iterator will be type vm_cnt and be stored on value stack.
2021-11-25 18:13:31 +08:00
ValKmjolnir
52b49edbcf
add unix.isdir and unix.isfile
2021-11-15 22:47:52 +08:00
ValKmjolnir
4bfce37f40
add bits lib
2021-10-28 21:49:08 +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
4f0acc4d63
fix dynamic para error
2021-10-18 22:05:31 +08:00
ValKmjolnir
885b57cd52
add upvalue info into detail crash info
2021-10-18 19:59:41 +08:00
ValKmjolnir
1bfa7d2638
update
2021-10-16 23:36:43 +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
ValKmjolnir
5d13261516
optimize source code
2021-10-12 18:26:10 +08:00
ValKmjolnir
56289b5d22
fully functional closure & add benchmark
2021-10-10 14:29:23 +08:00
ValKmjolnir
1733ac0573
vm_nil,vm_num changed to no-gcobject
2021-10-08 23:18:26 +08:00
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
90ac468aa9
update
2021-08-09 19:13:39 +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
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
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
Valk Richard Li
ae0dae5956
update
2021-06-21 01:02:09 +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
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
6adb991c04
parser reports syntax error accurately
...
still need improvement
2021-05-04 01:13:53 +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