Commit Graph

59 Commits

Author SHA1 Message Date
ValKmjolnir a51b7fe11a optimize codes 2022-01-16 22:48:00 +08:00
ValKmjolnir 82181b7af4 add debugger framework
with function:backtrace,run,help,show global/local/upvalue,exit
2021-12-20 21:33:22 +08:00
ValKmjolnir e706214854 bug fixed & add os.platform 2021-12-08 18:46:32 +08:00
ValKmjolnir ab6c194d71 add dylib.dlopen dylib.dlsym dylib.dlclose dylib.dlcall
now you could add your own modules into nasal without changing the source code!
2021-12-03 19:31:03 +08:00
ValKmjolnir cabce9370a delete ret stack/ add math.lg
now return address is stored on value stack
2021-12-02 22:23:22 +08:00
ValKmjolnir aeefaebcec add unix.opendir unix.readdir unix.closedir 2021-10-31 23:11:04 +08:00
ValKmjolnir 6b4116aece add unix.time unix.chdir unix.sleep unix.getcwd unix.getenv 2021-10-29 19:52:49 +08:00
ValKmjolnir d13e8084e5 add bits lib 2021-10-28 21:49:08 +08:00
ValKmjolnir b131a3ea9e add io lib & bug fixed 2021-10-27 23:05:25 +08:00
ValKmjolnir 101714986d optimize nasal_ast and fix bug in opr_slc2 2021-10-20 20:54:23 +08:00
ValKmjolnir a7b1851967 optimize code structure 2021-10-16 21:08:57 +08:00
ValKmjolnir 645a652830 change function name and cli format 2021-10-14 23:22:28 +08:00
ValKmjolnir 3ab5f00097 optimize source code 2021-10-12 18:26:10 +08:00
ValKmjolnir 42a330cda7 vm_nil,vm_num changed to no-gcobject 2021-10-08 23:18:26 +08:00
Li Haokun 87d5740125 add fg constants & change int(), num() 2021-09-02 19:10:49 +08:00
Li Haokun e7afc86d97 add isnan 2021-08-27 17:43:01 +08:00
ValKmjolnir b2f09ec855 closure bugs fixed 2021-08-17 01:18:35 +08:00
ValKmjolnir 49e9412915 use same indentation 2021-08-09 21:30:18 +08:00
Li Haokun e9bd033883 update 2021-08-09 19:13:39 +08:00
ValKmjolnir 143a59c735 update 2021-08-09 01:02:27 +08:00
Li Haokun a6fe835ed4 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
Li Haokun 1a180ae01a update 2021-07-19 17:04:45 +08:00
Li Haokun d9d7a1edfc add trace back info 2021-07-16 17:18:13 +08:00
ValKmjolnir d7ba29e02c delete slice_stack 2021-07-07 14:46:46 +08:00
ValKmjolnir ee9afe1cf1 change instruction dispatch to computed-goto
bug fixed
prepare for version 7.0
2021-06-26 14:53:10 +08:00
Valk Richard Li 40a1189b18 nothing changed 2021-06-20 01:27:01 +08:00
Valk Richard Li b9aa7f5db2 add statistical information 2021-06-19 00:32:10 +08:00
Valk Richard Li 1cd627d9c7 Add command line parameters & chr supports extended ASCII 2021-06-11 15:16:06 +08:00
Valk Richard Li 166fe32839 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 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 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 1f6e1a647e add stl & more efficient scope 2021-04-02 22:19:29 +08:00
Valk Richard Li 4202c2081e change id name & add test file 2021-03-30 00:12:48 +08:00
Valk Richard Li 6473b527a1 bug fixed 2021-03-28 17:39:24 +08:00
Valk Richard Li a990fb606a gc changed to mark-sweep 2021-03-27 01:08:05 +08:00
Valk Richard Li f3370ef0f7 change map to unordered_map 2021-03-01 15:54:58 +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
Sidi Liang 2eb0a6b332 Library: Added core library function chr according to FlightGear Nasal 2021-02-13 21:40:10 +08:00
Sidi Liang 9d5eafda09 Library: Added core library function streq and cmp according to FlightGear Nasal 2021-02-13 21:09:13 +08:00
Sidi Liang db1b28898c Library: Added core library function left and right according to FlightGear Nasal 2021-02-13 20:19:49 +08:00
Valk Richard Li 88b34c826c update 2021-02-12 22:27:41 +08:00
Valk Richard Li ee5f9519fe update 2021-02-10 00:12:22 +08:00
Valk Richard Li 990f8dfc48 update 2021-01-06 22:12:19 +08:00
Valk Richard Li f97ef49fb7 update 2021-01-06 21:07:34 +08:00
Valk Richard Li ed0d3e862d update 2020-12-24 23:53:31 +08:00
Valk Richard Li cfc9a97144 update 2020-12-19 23:47:04 +08:00
Valk Richard Li dff899061a preparation for v5.0 2020-12-19 01:26:15 +08:00
Valk Richard Li c95185e62b update 2020-12-14 23:43:00 +08:00