Commit Graph

1176 Commits

Author SHA1 Message Date
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
Valk Richard Li f0cb8b6ef3 update 2021-01-06 21:07:34 +08:00
Valk Richard Li 9474ac9ef0 update & bug fixed 2021-01-05 23:17:32 +08:00
Valk Richard Li b862aa91eb update 2021-01-05 01:55:17 +08:00
Valk Richard Li bc64d530be update 2021-01-02 23:57:21 +08:00
Valk Richard Li ea5116e963 update 2020-12-29 19:09:20 +08:00
Valk Richard Li cc4e697246 bug fixed 2020-12-26 19:05:04 +08:00