ValKmjolnir
c858afbb76
🐛 fix compilation error
...
in windows mingw-w64 win32 thread model,
but we do not suggest you to use this,
please use posix thread model
2023-04-23 00:02:39 +08:00
ValKmjolnir
5519dc7a29
⚡ merge runtime regs into struct context
2023-04-08 00:18:58 +08:00
ValKmjolnir
1678567c5d
✨ add multi-line error report and span
2023-03-08 01:12:01 +08:00
ValKmjolnir
e11793d340
🚀 add operator `^=` `&=` `|=`
...
fix bug of parsing expressions beginning with floater
2023-02-28 00:30:27 +08:00
ValKmjolnir
8df02d25ad
✨ add detail location info in tokens
...
prepare for multi-line error reporter module
2023-01-10 22:22:27 +08:00
ValKmjolnir
4c5ffb0240
🎨 change code format
2022-11-26 22:49:22 +08:00
ValKmjolnir
54969681fc
⚡ move lvalue check from parse to codegen
2022-11-20 17:06:13 +08:00
ValKmjolnir
aaccfbda11
🐛 fix ast print bug & delete some macros
2022-10-30 18:40:03 +08:00
ValKmjolnir
feea901e4d
🎨 improve code format
...
delete option -v, --version, -l, --lex
2022-10-30 01:26:26 +08:00
ValKmjolnir
d121dcd630
🎨 improve format of code
2022-10-28 23:28:15 +08:00
ValKmjolnir
3ef8effe9a
🔥 change `nasal_gc` to `gc`
2022-10-23 01:29:20 +08:00
ValKmjolnir
3fd1b25f79
🔥 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
025ff49ffc
🚀 add `stl/csv.nas` & ast name change
2022-10-19 00:54:21 +08:00
ValKmjolnir
24ae1c246f
📝 fix help info align
2022-09-15 23:37:46 +08:00
ValKmjolnir
b022b25cea
🚀 add colorful error info print.
2022-08-31 00:56:19 +08:00
ValKmjolnir
27ceeb517d
🐛 fix bug that `make test` failed
2022-08-29 00:48:06 +08:00
ValKmjolnir
24ba300f3c
🔥 delete `--opcnt` and replace the function of `-o` by `--optimize`.
2022-08-25 19:54:03 +08:00
ValKmjolnir
a91826607c
⚡ optimize header file, now modules could generate smaller dynamic libs.
2022-08-24 22:08:47 +08:00
ValKmjolnir
da8aa4744e
📝 add compilation time & update test/ppmgen.nas
2022-08-21 00:26:16 +08:00
ValKmjolnir
caf048aae4
⚡ 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
692f8ccefe
⚡ update doc & notes, optimize code
2022-08-18 20:41:33 +08:00
ValKmjolnir
732a00a1cd
🚀 add `[[noreturn]]`
2022-08-16 01:40:22 +08:00
ValKmjolnir
0493e18d0e
🚀 optimize code
2022-08-08 22:10:51 +08:00
ValKmjolnir
2937c10c77
📝 little change
2022-08-05 23:22:32 +08:00
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