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
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
baa4f5a258
change error info of native function __builtin_import
2022-01-31 14:48:51 +08:00
ValKmjolnir
0a407437a4
change native function num()
...
num now returns nil if the argument is not a number or numerable string.
2022-01-27 21:41:06 +08:00
ValKmjolnir
05ab4640da
add notes of some native functions in lib.nas
2022-01-26 23:51:25 +08:00
ValKmjolnir
630c99c39a
optimize codes
2022-01-16 22:48:00 +08:00
ValKmjolnir
189d49fa4a
add debugger framework
...
with function:backtrace,run,help,show global/local/upvalue,exit
2021-12-20 21:33:22 +08:00
ValKmjolnir
5a80258d20
bug fixed & add os.platform
2021-12-08 18:46:32 +08:00
ValKmjolnir
9861ecd03e
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
aa191a9feb
delete ret stack/ add math.lg
...
now return address is stored on value stack
2021-12-02 22:23:22 +08:00
ValKmjolnir
f8e2918561
add unix.opendir unix.readdir unix.closedir
2021-10-31 23:11:04 +08:00
ValKmjolnir
e4ea34db51
add unix.time unix.chdir unix.sleep unix.getcwd unix.getenv
2021-10-29 19:52:49 +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
540aeb73f4
optimize nasal_ast and fix bug in opr_slc2
2021-10-20 20:54:23 +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
1733ac0573
vm_nil,vm_num changed to no-gcobject
2021-10-08 23:18:26 +08:00
Li Haokun
c498d5c8c4
add fg constants & change int(), num()
2021-09-02 19:10:49 +08:00
Li Haokun
59dc0d1423
add isnan
2021-08-27 17:43:01 +08:00
ValKmjolnir
80cc8e9db7
closure bugs fixed
2021-08-17 01:18:35 +08:00
ValKmjolnir
638ec1c3a3
use same indentation
2021-08-09 21:30:18 +08:00
Li Haokun
90ac468aa9
update
2021-08-09 19:13:39 +08:00
ValKmjolnir
65dfef0a33
update
2021-08-09 01:02:27 +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
Li Haokun
7a93f5b89b
update
2021-07-19 17:04:45 +08:00
Li Haokun
9fe7a86a3b
add trace back info
2021-07-16 17:18:13 +08:00
ValKmjolnir
590c595522
delete slice_stack
2021-07-07 14:46:46 +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
Valk Richard Li
00c6e3b4fd
nothing changed
2021-06-20 01:27:01 +08:00
Valk Richard Li
cdf7b92a8e
add statistical information
2021-06-19 00:32:10 +08:00
Valk Richard Li
1ae47807eb
Add command line parameters & chr supports extended ASCII
2021-06-11 15:16:06 +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
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
c5f4736984
change scope from unordered_map to vector
2021-04-19 19:12:41 +08:00
Valk Richard Li
c88620920b
add stl & more efficient scope
2021-04-02 22:19:29 +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
a421470715
change map to unordered_map
2021-03-01 15:54:58 +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
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
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
8069a1b659
update
2021-01-06 22:12:19 +08:00