ValKmjolnir
7ad1d69c64
⚡ optimize code & chdir will not trigger crash if failed to call
2022-07-30 19:17:33 +08:00
ValKmjolnir
854850d9b1
🐛 fix bug of incorrectly searching paths of `lib.nas` and dynamic libs.
...
`dylib.dlopen` now only needs file name of dynamic lib, not the real path.
2022-07-29 22:49:50 +08:00
ValKmjolnir
006ed644e6
🚀 move fg constants to `stl/fg_env.nas`, add `io.exists`. now dlopen and import can search file in PATH.
2022-07-28 21:44:55 +08:00
ValKmjolnir
5dcf2ede66
📝 doc fix
2022-07-23 17:21:44 +08:00
ValKmjolnir
99a131c552
🚀 change `std::string` to `string`, change identifiers' name, `-o` is now a function available in debug mode.
2022-07-23 17:00:25 +08:00
ValKmjolnir
46516485b5
📝 change name of used types
2022-07-23 12:35:21 +08:00
ValKmjolnir
af761641d6
🚀 change `std::cout` to `std::clog` to put some log info
2022-07-21 23:16:16 +08:00
ValKmjolnir
fb25a4973c
⚡ optimize codes. details:
...
1. delete gc::builtin_alloc
2. add convenient way of getting new string object: gc::newstr, and shrink the size of codes
3. update doc
4. add gc::temp to be used in native/module functions to avoid being recognized as garbage incorrectly when triggered mark-sweep
2022-07-07 17:51:30 +08:00
ValKmjolnir
53b85cd459
🚀 add module/libsock.nas, preparing to add socket lib into this language.
2022-06-06 16:34:21 +08:00
ValKmjolnir
a2e2d5d8f6
✨ add native function runtime.argv() to get command line arguments
2022-06-04 20:12:00 +08:00
ValKmjolnir
7ec8418740
🚀 use ftime to calculate run time
2022-06-02 22:51:43 +08:00
ValKmjolnir
ebfacd9197
⚡ optimize codes
2022-05-22 18:19:13 +08:00
ValKmjolnir
23a5c1b1ad
🐛 bug fix
2022-05-06 20:58:02 +08:00
ValKmjolnir
fc25dd69e1
fix bug in codegen: foreach/forindex(id;vec/hash) may cause segmentation fault because of incorrect generated operand
2022-04-16 19:45:55 +08:00
ValKmjolnir
bf5737ecfd
add native function abort(), assert()
2022-04-06 21:25:20 +08:00
ValKmjolnir
617ad03d33
add math.pow
2022-03-27 16:14:55 +08:00
ValKmjolnir
27e25f84ec
update main.cpp and bug fix
2022-03-20 18:28:45 +08:00
ValKmjolnir
0291908675
update README.md
2022-02-14 17:29:26 +08:00
ValKmjolnir
9139e34c0b
update README & bug fixed
2022-02-13 16:10:02 +08:00
ValKmjolnir
e7f503fae1
now local values are stored on stack. upvalue is generated when creating a new function in local scope.
...
may include some bugs inside. but all test files has passed the test so i decide to push it.
2022-02-12 23:12:30 +08:00
ValKmjolnir
24a1e39ad3
add garbage collector and memory allocator info. use '-d' to activate this function.
2022-02-08 23:40:52 +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
bf780514e6
add constant string calculation in optimizer
2022-02-01 21:20:36 +08:00
ValKmjolnir
4def93b4ad
bug fixed in nasal_vec::print and nasal_hash::print
...
if vec's or hash's size is 0, a bug will occur because ++depth. now the ++depth has been put behind the size()
2022-01-29 19:51:43 +08:00
ValKmjolnir
c68b4c5947
add new option -op & --optimize to use optimizer | delete bytecode op_pone & op_pzero
2022-01-22 13:37:49 +08:00
ValKmjolnir
40344455e6
add optimizer
...
optimizer now does one work: calculate const number before generating bytecode
2022-01-22 00:41:08 +08:00
ValKmjolnir
f0ae63bce5
lexer,parser,import,codegen use the same error module.
2021-12-23 21:15:50 +08:00
ValKmjolnir
30650bb64f
update error info (except parser)
...
prepare for nasal_err module
2021-12-23 14:09:54 +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
cd08b2d1bb
change code structure
2021-11-02 22:44:42 +08:00
ValKmjolnir
f8e2918561
add unix.opendir unix.readdir unix.closedir
2021-10-31 23:11:04 +08:00
ValKmjolnir
56280db2c7
fix sigsegv error
2021-10-18 21:50:25 +08:00
ValKmjolnir
bbee31ea55
add detail crash info
2021-10-17 22:57:45 +08:00
ValKmjolnir
1bfa7d2638
update
2021-10-16 23:36:43 +08:00
ValKmjolnir
d4a9412947
optimize code structure
2021-10-16 21:08:57 +08:00
ValKmjolnir
e41f728589
update
2021-10-15 22:21:57 +08:00
ValKmjolnir
577546763f
change function name and cli format
2021-10-14 23:22:28 +08:00
ValKmjolnir
818685c48d
change output format of information of bytecodes
2021-10-13 22:59:15 +08:00
ValKmjolnir
1733ac0573
vm_nil,vm_num changed to no-gcobject
2021-10-08 23:18:26 +08:00
Li Haokun
618ce59233
bad access bug fixed
2021-09-13 19:55:03 +08:00
Li Haokun
c498d5c8c4
add fg constants & change int(), num()
2021-09-02 19:10:49 +08:00
Li Haokun
385f0af17e
nothing changed
2021-08-24 19:34:52 +08:00
Li Haokun
ef9b781961
security holes fixed
2021-08-19 17:54:36 +08:00
Li Haokun
35fc848672
fully functional closure
2021-08-11 14:54:17 +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
76a2548e95
update
2021-08-06 18:57:06 +08:00
Li Haokun
40b690b67b
update
2021-08-05 19:02:41 +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