ValKmjolnir
ebfacd9197
⚡ optimize codes
2022-05-22 18:19:13 +08:00
ValKmjolnir
99dca532f6
📝 add notes in nasal_codegen.h and nasal_vm.h. add register_info() in debugger.
2022-05-21 14:22:54 +08:00
ValKmjolnir
c5171c735a
💬 change code related to macros 'PRTHEX'
2022-05-08 19:43:27 +08:00
ValKmjolnir
51a1279110
✨ 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
fd8a148d0c
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
7417d5e635
change makefile
2022-04-26 22:53:35 +08:00
ValKmjolnir
785572634b
change visual settings in -c/-dbg
2022-04-23 01:51:49 +08:00
ValKmjolnir
4f5fd3de33
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
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
022460755f
optimize codes
2022-04-12 18:26:54 +08:00
ValKmjolnir
4503239731
change STACK_MAX_DEPTH to nasal_gc::stack_depth
2022-04-09 23:14:28 +08:00
ValKmjolnir
617ad03d33
add math.pow
2022-03-27 16:14:55 +08:00
ValKmjolnir
b66ebbef4b
fix bytecode output format bug
2022-03-27 13:10:35 +08:00
ValKmjolnir
86f6296268
change opcode print format
2022-03-27 01:20:17 +08:00
ValKmjolnir
27e25f84ec
update main.cpp and bug fix
2022-03-20 18:28:45 +08:00
ValKmjolnir
9bcad59e45
change enum obj_type to nasal_obj::obj_type
2022-03-15 22:51:14 +08:00
ValKmjolnir
a4738e8c7d
delete operand `op_nop`
2022-02-16 23:27:22 +08:00
ValKmjolnir
980350d70a
prepare for function-call optimization
2022-02-12 18:03:50 +08:00
ValKmjolnir
2a85e92d4a
optimize test file & little update.
2022-02-06 19:55:45 +08:00
ValKmjolnir
d6d90ab7c8
change 'global' & 'local' in codegen to std::unordered_map & std::vector<std::unordered_map>>
2022-02-02 23:52:00 +08:00
ValKmjolnir
eaa54035ff
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
c68b4c5947
add new option -op & --optimize to use optimizer | delete bytecode op_pone & op_pzero
2022-01-22 13:37:49 +08:00
ValKmjolnir
630c99c39a
optimize codes
2022-01-16 22:48:00 +08:00
ValKmjolnir
1923fc74e4
update README.md
2021-12-23 21:46:53 +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
c27c5b70ee
little update
2021-12-16 23:53:13 +08:00
ValKmjolnir
aa191a9feb
delete ret stack/ add math.lg
...
now return address is stored on value stack
2021-12-02 22:23:22 +08:00
ValKmjolnir
b8ef3cf6b6
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
0a8655eb4d
fixed bug of in_foreach and in_forindex
2021-11-22 14:24:28 +08:00
ValKmjolnir
52b49edbcf
add unix.isdir and unix.isfile
2021-11-15 22:47:52 +08:00
ValKmjolnir
6a35c58df4
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
ValKmjolnir
cd08b2d1bb
change code structure
2021-11-02 22:44:42 +08:00
ValKmjolnir
fd0d836c03
add io lib & bug fixed
2021-10-27 23:05:25 +08:00
ValKmjolnir
540aeb73f4
optimize nasal_ast and fix bug in opr_slc2
2021-10-20 20:54:23 +08:00
ValKmjolnir
d4a9412947
optimize code structure
2021-10-16 21:08: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
5d13261516
optimize source code
2021-10-12 18:26:10 +08:00
ValKmjolnir
56289b5d22
fully functional closure & add benchmark
2021-10-10 14:29:23 +08:00
ValKmjolnir
d71b4f09e2
prepare for version 8.0
2021-10-08 15:32:18 +08:00
Li Haokun
618ce59233
bad access bug fixed
2021-09-13 19:55:03 +08:00
Li Haokun
071d8bd1ce
update
2021-09-10 19:13:42 +08:00
Li Haokun
ef9b781961
security holes fixed
2021-08-19 17:54:36 +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
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
ValKmjolnir
884b56ac09
bug fixed & raw string print
2021-07-21 00:20:25 +08:00