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
Valk Richard Li
aae9395d66
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
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
Valk Richard Li
a7d6518bff
add test file & update README
2021-04-04 23:35:13 +08:00
Valk Richard Li
0700ce14f7
change function of vapp & README update
2021-04-03 23:47:14 +08:00
Valk Richard Li
c88620920b
add stl & more efficient scope
2021-04-02 22:19:29 +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
b06e1bb5dd
add static symbol check & test file update
2021-03-30 15:55:38 +08:00
Valk Richard Li
c7316e9780
change id name & add test file
2021-03-30 00:12:48 +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
569d5c6c6a
update
2021-03-11 23:18:04 +08:00
Valk Richard Li
7087c67d79
add constant table in vm
2021-03-08 19:45:33 +08:00
Valk Richard Li
c4e6a89959
update test files and prepare the release of v5.0
2021-03-07 16:33:43 +08:00
Valk Richard Li
f60f674845
delete op_entry
2021-03-04 15:53:34 +08:00
Valk Richard Li
c21d40c466
change test files
2021-03-03 09:20:42 +08:00
Valk Richard Li
19b590f3bb
add test files
2021-03-03 01:09:57 +08:00
Valk Richard Li
a421470715
change map to unordered_map
2021-03-01 15:54:58 +08:00
Valk Richard Li
79dc13f419
update
2021-02-27 22:45:51 +08:00
Valk Richard Li
2e8208a752
add getParent & getPath
2021-02-25 22:30:28 +08:00
Valk Richard Li
1c40cca673
add tutorial of how to add built-in function
2021-02-23 23:33:01 +08:00
Valk Richard Li
b1a5a5f6c0
clear memory footprint when codegen complete
2021-02-23 22:53:28 +08:00
Valk Richard Li
64961877de
Add props lib & bug fixed(op_ret in foreach/index got SIGSEGV)
2021-02-18 23:49:29 +08:00
Valk Richard Li
9c9bb52818
codegen will not generate 'jmp' if 'if' and 'elsif' is the last condition
2021-02-18 11:45:47 +08:00
Valk Richard Li
02148f4766
bug fixed & more efficient function call
...
fixed a bug when different hash calling the same function,'me' will be set to the latest called hash's address.
changed the way of pushing the scope to the stack by copying a new scope from the function's scope address.
use map as the nasal_scop instead of list<map>,it'll be more efficient.
2021-02-17 19:31:44 +08:00
Valk Richard Li
767711c93a
change identifier name to avoid misunderstanding
2021-02-15 15:29:55 +08:00
Valk Richard Li
78ba0641a6
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
80683c381f
bug fixed
2021-02-13 23:57:53 +08:00
Li Haokun
6aac46adaf
Merge pull request #5 from sidi762/master
...
Added left, right, streq, cmp, chr to library functions
2021-02-13 07:24:17 -08:00
Sidi Liang
388ef66308
Library: added comment for chr
2021-02-13 21:43:07 +08:00
Sidi Liang
8faa4ef2db
Library: Added core library function chr according to FlightGear Nasal
2021-02-13 21:40:10 +08:00
Sidi Liang
441c02d0fb
Library: Added core library function streq and cmp according to FlightGear Nasal
2021-02-13 21:09:13 +08:00
Sidi Liang
953ad80482
Library: Added core library function left and right according to FlightGear Nasal
2021-02-13 20:19:49 +08:00
Valk Richard Li
e2ee9cff4c
update
2021-02-13 14:37:21 +08:00
Valk Richard Li
996ac59c79
update parser to LL(1)
2021-02-13 13:28:20 +08:00
Valk Richard Li
944f713ee9
update
2021-02-13 11:09:31 +08:00
Valk Richard Li
7329c70492
identifiers' name changed
2021-02-12 23:48:51 +08:00
Valk Richard Li
b5514fd269
update
2021-02-12 22:27:41 +08:00
Valk Richard Li
3be50116fa
update
2021-02-10 00:12:22 +08:00
Valk Richard Li
125d6d3a7d
update
2021-01-23 19:21:37 +08:00
Valk Richard Li
bb746dfbfb
update
2021-01-23 17:57:05 +08:00
Valk Richard Li
8069a1b659
update
2021-01-06 22:12:19 +08:00