ValKmjolnir
|
4be9c8b5c1
|
update test/tetris.nas
|
2022-02-23 01:09:31 +08:00 |
|
ValKmjolnir
|
728211e611
|
fix bug in libkey and test/tetris.nas
|
2022-02-22 18:01:49 +08:00 |
|
ValKmjolnir
|
2d4255a162
|
finish tetris.nas
|
2022-02-21 17:10:13 +08:00 |
|
ValKmjolnir
|
98668da741
|
finish basic functions of tetris
|
2022-02-21 00:47:32 +08:00 |
|
ValKmjolnir
|
7812c7f691
|
finish map drawing in test/tetris.nas
|
2022-02-20 17:58:13 +08:00 |
|
ValKmjolnir
|
84aa18d5d2
|
add new third-lib libkey that includes function: kbhit,getch,nonblock
|
2022-02-19 16:55:54 +08:00 |
|
ValKmjolnir
|
50b2cdd513
|
update README.md
|
2022-02-18 15:59:27 +08:00 |
|
ValKmjolnir
|
78361539c7
|
update test file
|
2022-02-18 15:36:34 +08:00 |
|
ValKmjolnir
|
9cbbbe2058
|
add special character \e.
|
2022-02-18 01:58:49 +08:00 |
|
ValKmjolnir
|
2be7324cde
|
change parameter name in native function split.
|
2022-02-17 23:34:58 +08:00 |
|
ValKmjolnir
|
6fee4da9a0
|
delete operand op_nop
|
2022-02-16 23:27:22 +08:00 |
|
ValKmjolnir
|
4814498f73
|
change tutorial's place in README.md
|
2022-02-15 23:42:17 +08:00 |
|
ValKmjolnir
|
b010fde8b1
|
fixed bug when -O0 the program crashes with code 01.
add `nasal_err():error(0){}` in `nasal_err.h:47` as the constructor.
|
2022-02-14 17:40:19 +08:00 |
|
ValKmjolnir
|
7958fd8919
|
update README.md
|
2022-02-14 17:29:26 +08:00 |
|
ValKmjolnir
|
7ced74a0a5
|
add new gc type vm_upval
|
2022-02-13 22:40:54 +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
|
c7909bfdf8
|
prepare for function-call optimization
v8.0
|
2022-02-12 18:03:50 +08:00 |
|
ValKmjolnir
|
3ca42d1fd9
|
update test/calc.nas & print function of nasal_vec/nasal_hash
|
2022-02-11 17:04:27 +08:00 |
|
ValKmjolnir
|
4fa2a45a07
|
little update
|
2022-02-10 22:20:18 +08:00 |
|
ValKmjolnir
|
6908e509ac
|
add notes in lib.nas & add runtime.gc() & add total instruction count in '-o'.
|
2022-02-09 15:53:09 +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
|
87f2b78fc8
|
update/optimize test files
|
2022-02-07 23:41:50 +08:00 |
|
ValKmjolnir
|
54da9e4ee1
|
optimize test file & little update.
|
2022-02-06 19:55:45 +08:00 |
|
ValKmjolnir
|
1381cb924d
|
reuse codes in nasal_vec::print and nasal_hash::print
now they all use nasal_ref::print
|
2022-02-05 23:55:56 +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
|
0783f02860
|
change increment argument in nasal_gc, because new vm doesn't need to alloc new objects frequently.
vm_str 2048 -> 512
vm_func 1024 -> 512
vm_vec 8192 -> 512
|
2022-02-03 22:43:51 +08:00 |
|
ValKmjolnir
|
9a245078d7
|
change 'global' & 'local' in codegen to std::unordered_map & std::vector<std::unordered_map>>
|
2022-02-02 23:52:00 +08:00 |
|
ValKmjolnir
|
88ef0f8dd6
|
add constant string calculation in optimizer
|
2022-02-01 21:20:36 +08:00 |
|
ValKmjolnir
|
de0a6d9388
|
change name of enum:ast_hashmember->ast_pair, ast_new_iter->ast_iter
change ast_hashmember to ast_pair is because this type in fact is the same as std::pair<std::string,nasal_ref> in C++
|
2022-01-31 17:22:44 +08:00 |
|
ValKmjolnir
|
93c0c47762
|
change error info of native function __builtin_import
|
2022-01-31 14:48:51 +08:00 |
|
ValKmjolnir
|
34f07ffb6b
|
optimize nasal_import::check_import
|
2022-01-30 23:26:30 +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
|
dfee0d713d
|
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
|
454fe1cfa3
|
add notes of some native functions in lib.nas
|
2022-01-26 23:51:25 +08:00 |
|
ValKmjolnir
|
0b5b9ced12
|
update README.md
|
2022-01-25 15:02:57 +08:00 |
|
ValKmjolnir
|
6812a389dc
|
update new test data
|
2022-01-24 15:19:27 +08:00 |
|
ValKmjolnir
|
8700fb31cc
|
fix errors in README.md
|
2022-01-22 22:19:14 +08:00 |
|
ValKmjolnir
|
ee6bc07b78
|
fix error in README.md
|
2022-01-22 22:09:00 +08:00 |
|
ValKmjolnir
|
9479fe8e78
|
add contents in README.md
|
2022-01-22 22:05:42 +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
|
a51b7fe11a
|
optimize codes
|
2022-01-16 22:48:00 +08:00 |
|
ValKmjolnir
|
2ff88b7073
|
add test file 'turingmachine.nas' & change output format of ast & bug fixed
|
2021-12-28 20:23:47 +08:00 |
|
ValKmjolnir
|
37b0d7f12a
|
bug fixed
|
2021-12-25 15:56:08 +08:00 |
|
ValKmjolnir
|
ac80216ea8
|
update README.md
|
2021-12-23 21:46:53 +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
|
57cc368029
|
debug info now shows both source code and bytecode
|
2021-12-21 19:57:23 +08:00 |
|
ValKmjolnir
|
ffb0f07eec
|
add debugger function: break point & next step
|
2021-12-21 15:27:38 +08:00 |
|