Valk Richard Li
a3d629a08e
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
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
a499c75932
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
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
2405bada81
change scope from unordered_map to vector
2021-04-19 19:12:41 +08:00
Valk Richard Li
d51465cc82
change function of vapp & README update
2021-04-03 23:47:14 +08:00
Valk Richard Li
1f6e1a647e
add stl & more efficient scope
2021-04-02 22:19:29 +08:00
Valk Richard Li
7f191f353e
add static symbol check & test file update
2021-03-30 15:55:38 +08:00
Valk Richard Li
4202c2081e
change id name & add test file
2021-03-30 00:12:48 +08:00
Valk Richard Li
a990fb606a
gc changed to mark-sweep
2021-03-27 01:08:05 +08:00
Valk Richard Li
ca27c5545a
add constant table in vm
2021-03-08 19:45:33 +08:00
Valk Richard Li
6187ca1d8e
delete op_entry
2021-03-04 15:53:34 +08:00
Valk Richard Li
f3370ef0f7
change map to unordered_map
2021-03-01 15:54:58 +08:00
Valk Richard Li
03dcdd0f1e
Add props lib & bug fixed(op_ret in foreach/index got SIGSEGV)
2021-02-18 23:49:29 +08:00
Valk Richard Li
6cb0e19ba3
codegen will not generate 'jmp' if 'if' and 'elsif' is the last condition
2021-02-18 11:45:47 +08:00
Valk Richard Li
cc81ee94be
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
805efbd104
update
2021-02-13 14:37:21 +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
14c43c6a42
update & bug fixed
2021-01-05 23:17:32 +08:00
Valk Richard Li
538d37a0cd
update
2021-01-02 23:57:21 +08:00
Valk Richard Li
010984330a
update
2020-12-29 19:09:20 +08:00
Valk Richard Li
d92bc191bd
bug fixed
2020-12-26 19:05:04 +08:00
Valk Richard Li
e797766950
bug fixed
2020-12-25 13:22:57 +08:00
Valk Richard Li
eed3667f59
update
2020-12-15 21:13:22 +08:00
Valk Richard Li
c95185e62b
update
2020-12-14 23:43:00 +08:00
Valk Richard Li
bced42ff38
update
2020-12-12 19:58:43 +08:00
Valk Richard Li
0fec1e462e
update
2020-12-12 01:58:40 +08:00
Valk Richard Li
b081a2be1d
update
2020-12-11 13:46:56 +08:00
Valk Richard Li
3339917510
update
2020-12-10 00:01:25 +08:00
Valk Richard Li
b4527926fe
bug fixed
2020-12-09 18:34:49 +08:00
Valk Richard Li
4419508a67
update
2020-12-09 15:33:33 +08:00
Valk Richard Li
7b7a9359e0
update
2020-12-07 19:37:19 +08:00
Valk Richard Li
e162727d3b
update
2020-12-06 21:07:40 +08:00
Valk Richard Li
0544e178f5
update
2020-12-04 00:15:02 +08:00
Valk Richard Li
a943c6e9f9
update
2020-12-04 00:00:29 +08:00
Valk Richard Li
6b94345a4d
update
2020-11-29 00:54:54 +08:00
Valk Richard Li
ff532a40db
update
2020-11-28 01:14:23 +08:00
Valk Richard Li
dfbd853f66
update
2020-11-20 00:18:17 +08:00
Valk Richard Li
0ca92c4693
update
2020-11-19 15:20:43 +08:00
Valk Richard Li
92e55854ce
update
2020-11-09 00:26:15 +08:00
Valk Richard Li
6272245df3
fixed bug of codegen
2020-10-25 23:39:27 +08:00
Valk Richard Li
84f09cb932
change project structure
...
version 3.0
2020-10-23 14:53:04 +08:00