ValKmjolnir
ce6a9865d7
🔥 change nasal_gc to gc
2022-10-23 01:29:20 +08:00
ValKmjolnir
1a0f81214f
🔥 change class name.
...
nasal_lexer -> lexer
nasal_parse -> parse
nasal_codegen -> codegen
nasal_vm -> vm
nasal_gc -> gc
nasal_dbg -> debugger
nasal_import -> linker
nas_ref -> var
2022-10-21 01:29:29 +08:00
ValKmjolnir
ac26105231
🚀 add stl/csv.nas & ast name change
2022-10-19 00:54:21 +08:00
ValKmjolnir
abd23b215c
📝 fix help info align
2022-09-15 23:37:46 +08:00
ValKmjolnir
fb00ddc19a
🚀 add colorful error info print.
2022-08-31 00:56:19 +08:00
ValKmjolnir
4dfc4012df
🐛 fix bug that make test failed
2022-08-29 00:48:06 +08:00
ValKmjolnir
99494c067c
🔥 delete --opcnt and replace the function of -o by --optimize.
2022-08-25 19:54:03 +08:00
ValKmjolnir
6318f7e9e8
⚡ optimize header file, now modules could generate smaller dynamic libs.
2022-08-24 22:08:47 +08:00
ValKmjolnir
a82ffe8b46
📝 add compilation time & update test/ppmgen.nas
2022-08-21 00:26:16 +08:00
ValKmjolnir
325a7236e7
⚡ several updates.
...
1. merge `--chkpath` `-cp` with `-d`
2. complete test/ppmgen.nas
3. update comments about why we don't use `atof` to convert string to
number
4. update .gitignore
2022-08-19 23:25:46 +08:00
ValKmjolnir
5d67648d06
⚡ update doc & notes, optimize code
2022-08-18 20:41:33 +08:00
ValKmjolnir
e92134c5e8
🚀 add [[noreturn]]
2022-08-16 01:40:22 +08:00
ValKmjolnir
e51ba92f30
🚀 optimize code
2022-08-08 22:10:51 +08:00
ValKmjolnir
e6fb388701
📝 little change
2022-08-05 23:22:32 +08:00
ValKmjolnir
9c779b871f
⚡ optimize code & chdir will not trigger crash if failed to call
2022-07-30 19:17:33 +08:00
ValKmjolnir
ca6cb5daae
🐛 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
fb37283be0
🚀 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
bbfe3fff9a
📝 doc fix
2022-07-23 17:21:44 +08:00
ValKmjolnir
49a7ed28e9
🚀 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
65fe7daff6
📝 change name of used types
2022-07-23 12:35:21 +08:00
ValKmjolnir
7a9ce29710
🚀 change std::cout to std::clog to put some log info
2022-07-21 23:16:16 +08:00
ValKmjolnir
ec308f8053
⚡ 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
a166134cc5
🚀 add module/libsock.nas, preparing to add socket lib into this language.
2022-06-06 16:34:21 +08:00
ValKmjolnir
ec2866021f
✨ add native function runtime.argv() to get command line arguments
2022-06-04 20:12:00 +08:00
ValKmjolnir
c1808a7875
🚀 use ftime to calculate run time
2022-06-02 22:51:43 +08:00
ValKmjolnir
8b63c44266
⚡ optimize codes
2022-05-22 18:19:13 +08:00
ValKmjolnir
3e418dbcff
🐛 bug fix
2022-05-06 20:58:02 +08:00
ValKmjolnir
85490a3136
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
0b4db9467e
add native function abort(), assert()
2022-04-06 21:25:20 +08:00
ValKmjolnir
51e9b0b5ab
add math.pow
2022-03-27 16:14:55 +08:00
ValKmjolnir
d5d426d6eb
update main.cpp and bug fix
2022-03-20 18:28:45 +08:00
ValKmjolnir
7958fd8919
update README.md
2022-02-14 17:29:26 +08:00
ValKmjolnir
f16259b2da
update README & bug fixed
2022-02-13 16:10:02 +08:00
ValKmjolnir
0d5b0fa57d
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
ee01e0992c
add garbage collector and memory allocator info. use '-d' to activate this function.
2022-02-08 23:40:52 +08:00
ValKmjolnir
666feae851
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
88ef0f8dd6
add constant string calculation in optimizer
2022-02-01 21:20:36 +08:00
ValKmjolnir
6601912de4
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
93b2edc08c
add new option -op & --optimize to use optimizer | delete bytecode op_pone & op_pzero
2022-01-22 13:37:49 +08:00
ValKmjolnir
6c3e5e6a02
add optimizer
...
optimizer now does one work: calculate const number before generating bytecode
2022-01-22 00:41:08 +08:00
ValKmjolnir
1ae354c0cf
lexer,parser,import,codegen use the same error module.
2021-12-23 21:15:50 +08:00
ValKmjolnir
bde94f8ec6
update error info (except parser)
...
prepare for nasal_err module
2021-12-23 14:09:54 +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
bc9039dd37
change code structure
2021-11-02 22:44:42 +08:00
ValKmjolnir
aeefaebcec
add unix.opendir unix.readdir unix.closedir
2021-10-31 23:11:04 +08:00
ValKmjolnir
32465b92c8
fix sigsegv error
2021-10-18 21:50:25 +08:00
ValKmjolnir
515a2685fe
add detail crash info
2021-10-17 22:57:45 +08:00
ValKmjolnir
d7cffc76bd
update
2021-10-16 23:36:43 +08:00
ValKmjolnir
a7b1851967
optimize code structure
2021-10-16 21:08:57 +08:00
ValKmjolnir
a71b08a927
update
2021-10-15 22:21:57 +08:00