ValKmjolnir
4bdfa9cb61
🚀 import information output of dbg, vm and codegen
2022-09-11 17:22:00 +08:00
ValKmjolnir
0f59028c82
⚡ improve error output info generated by codegen.
2022-09-05 00:41:36 +08:00
ValKmjolnir
8d0eadaa74
📝 fix MSVC warning in nasal_builtin.h & improve error output.
2022-09-04 23:08:06 +08:00
ValKmjolnir
f70ce082fd
🎨 improve error log output format.
2022-09-02 02:04:03 +08:00
ValKmjolnir
6318f7e9e8
⚡ optimize header file, now modules could generate smaller dynamic libs.
2022-08-24 22:08:47 +08:00
ValKmjolnir
d2b63b394e
📝 optimize codes
2022-08-01 22:51:19 +08:00
ValKmjolnir
13ddfa5050
📝 delete unnecessary code & change test file.
2022-07-31 19:26:13 +08:00
ValKmjolnir
4ab8a730a6
📝 change int in code to i32, optimize code.
2022-07-31 02:19:29 +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
76aca0d528
⚡ correct types in nasal_codegen.h
2022-07-27 00:59:35 +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
dea85929cd
📝 change identifiers' name
2022-07-18 23:54:44 +08:00
ValKmjolnir
00c7c4044a
⚡ optimize code & replace all printf with std::cout.
2022-07-09 23:36:14 +08:00
ValKmjolnir
fdcd85dadf
⚡ optimize code.
2022-07-08 23:00:36 +08:00
ValKmjolnir
87d7de5d73
📝 change some identifiers' name.
2022-07-08 18:16:00 +08:00
ValKmjolnir
aea8b317c7
🚀 shrink code size & now import module can search lib file from local dir and dirs in PATH
2022-07-08 00:42:56 +08:00
ValKmjolnir
8b63c44266
⚡ optimize codes
2022-05-22 18:19:13 +08:00
ValKmjolnir
11b5d6fc56
📝 add notes in nasal_codegen.h and nasal_vm.h. add register_info() in debugger.
2022-05-21 14:22:54 +08:00
ValKmjolnir
e1c09fb4a2
💬 change code related to macros 'PRTHEX'
2022-05-08 19:43:27 +08:00
ValKmjolnir
a4bbb100b6
✨ add utf-8 identifier check in nasal_lexer & fix printf format at windows platform & add test file utf8chk.nas
2022-05-07 16:50:13 +08:00
ValKmjolnir
7fd3c4213f
bytecode info print and debugger will show the front 16 characters of strings whose length is greater than 16
2022-05-02 16:56:03 +08:00
ValKmjolnir
1d4494163c
change makefile
2022-04-26 22:53:35 +08:00
ValKmjolnir
ce48ec1b8d
change visual settings in -c/-dbg
2022-04-23 01:51:49 +08:00
ValKmjolnir
cd2736b924
op_addeq~op_lnkeq and op_addeqc~op_lnkeqc and op_meq operands now can do pop, this will decrease the frequency of calling op_pop
2022-04-17 17:20:18 +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
92989ed9f6
optimize codes
2022-04-12 18:26:54 +08:00
ValKmjolnir
68c1b43179
change STACK_MAX_DEPTH to nasal_gc::stack_depth
2022-04-09 23:14:28 +08:00
ValKmjolnir
51e9b0b5ab
add math.pow
2022-03-27 16:14:55 +08:00
ValKmjolnir
d89c0fe096
fix bytecode output format bug
2022-03-27 13:10:35 +08:00
ValKmjolnir
c6efb9f190
change opcode print format
2022-03-27 01:20:17 +08:00
ValKmjolnir
d5d426d6eb
update main.cpp and bug fix
2022-03-20 18:28:45 +08:00
ValKmjolnir
7ef9dd9371
change enum obj_type to nasal_obj::obj_type
2022-03-15 22:51:14 +08:00
ValKmjolnir
6fee4da9a0
delete operand op_nop
2022-02-16 23:27:22 +08:00
ValKmjolnir
c7909bfdf8
prepare for function-call optimization
2022-02-12 18:03:50 +08:00
ValKmjolnir
54da9e4ee1
optimize test file & little update.
2022-02-06 19:55:45 +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
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
93b2edc08c
add new option -op & --optimize to use optimizer | delete bytecode op_pone & op_pzero
2022-01-22 13:37:49 +08:00
ValKmjolnir
a51b7fe11a
optimize codes
2022-01-16 22:48:00 +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
82181b7af4
add debugger framework
...
with function:backtrace,run,help,show global/local/upvalue,exit
2021-12-20 21:33:22 +08:00
ValKmjolnir
083293e3db
little update
2021-12-16 23:53:13 +08:00
ValKmjolnir
cabce9370a
delete ret stack/ add math.lg
...
now return address is stored on value stack
2021-12-02 22:23:22 +08:00
ValKmjolnir
7169f25774
delete op_cntpop & counter stack
...
now the iterator will be type vm_cnt and be stored on value stack.
2021-11-25 18:13:31 +08:00
ValKmjolnir
56c9cb60ab
fixed bug of in_foreach and in_forindex
2021-11-22 14:24:28 +08:00
ValKmjolnir
e1d5ab2da5
add unix.isdir and unix.isfile
2021-11-15 22:47:52 +08:00
ValKmjolnir
b67cd85cb4
2 bugs fixed:
...
empty string will be true in conditional expressions,but now it is false(and string that is not empty and is not numerable will be true)
foreach(var i;func(){return []}()); will cause sigsegv because codegen generates error op_pop and op_cntpop,now the counter in_foreach and in_forindex change after generating
foreach/forindex expression before block generation.
2021-11-14 23:05:34 +08:00