ValKmjolnir
068743aa4c
📝 change `int` in code to `i32`, optimize code.
2022-07-31 02:19:29 +08:00
ValKmjolnir
4c95d622f6
🚀 shrink stack size & optimize nasal_vm::traceback
2022-07-25 00:23:07 +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
cfbec9a3f1
📝 change identifiers' name
2022-07-18 23:54:44 +08:00
ValKmjolnir
577ecd14df
🚀 update makefile to choose different compilers by users & fix some codes for MSVC to compile.
2022-07-16 16:53:11 +08:00
ValKmjolnir
f1f48b4881
⚡ first step trying to make this project compiled by MSVC: using indirect-threading, change `\e` to `\033`.
2022-07-16 01:02:33 +08:00
ValKmjolnir
bcdc55a652
⚡ optimize code & replace all `printf` with `std::cout`.
2022-07-09 23:36:14 +08:00
ValKmjolnir
9890b46f02
⚡ optimize code.
2022-07-08 23:00:36 +08:00
ValKmjolnir
11e9567b55
📝 change some identifiers' name.
2022-07-08 18:16:00 +08:00
ValKmjolnir
5d4cff0aa8
🚀 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
75c46fa727
🚀 change usleep in builtin_sleep to cross platform c++11::std::this_thread::sleep_for.
...
Although this is not so accurate in Windows platform, the accuracy is still improved and this line of code does not need MinGW to build on Windows platform.
2022-07-07 14:35:10 +08:00
ValKmjolnir
bd5044add2
🚀 add a new way to import other files:
...
`import("./stl/queue.nas");` now has same function as `import.stl.queue;`
2022-07-06 22:21:01 +08:00
ValKmjolnir
82b33ffe4a
📝 change name of some identifiers. shrink size of main stack.
2022-07-05 18:13:54 +08:00
ValKmjolnir
92d68b357c
⚡ optimize vm
2022-07-04 00:16:04 +08:00
ValKmjolnir
8b8fb79013
📝 unify code style of ./stl ./test
2022-07-02 13:53:50 +08:00
ValKmjolnir
c993c77b78
✨ change format of error info
...
parser now can report exact place where is lacking ';' or ','
2022-06-30 23:15:10 +08:00
ValKmjolnir
ebfacd9197
⚡ optimize codes
2022-05-22 18:19:13 +08:00
ValKmjolnir
120ceb429a
🚀 add coroutine library(beta) and lib function settimer&maketimestamp
2022-05-19 20:09:23 +08:00
ValKmjolnir
712a047a43
🐛 now builtin_md5 uses unsigned char instead of char
2022-05-15 20:35:20 +08:00
ValKmjolnir
396d55a207
✅ fix some warnings
2022-05-09 18:42:40 +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
de262980cc
🎨 improve rawstr() and builtin_getcwd(..), change format output in nasal_vm::valinfo()
2022-05-07 02:22:49 +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
cf722fd98c
fix bug: windows ps/cmd output unicode in bytecodes abnormally.
...
so we use the hex format to print them.
2022-03-23 22:54:07 +08:00
ValKmjolnir
e6457651d3
add unix.waitpid
2022-03-16 18:44:38 +08:00
ValKmjolnir
e77bb73a82
add special character `\e`.
2022-02-18 01:58: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
ValKmjolnir
f0ae63bce5
lexer,parser,import,codegen use the same error module.
2021-12-23 21:15:50 +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
9861ecd03e
add dylib.dlopen dylib.dlsym dylib.dlclose dylib.dlcall
...
now you could add your own modules into nasal without changing the source code!
2021-12-03 19:31:03 +08:00
ValKmjolnir
f8e2918561
add unix.opendir unix.readdir unix.closedir
2021-10-31 23:11:04 +08:00
ValKmjolnir
e4ea34db51
add unix.time unix.chdir unix.sleep unix.getcwd unix.getenv
2021-10-29 19:52:49 +08:00
ValKmjolnir
fd0d836c03
add io lib & bug fixed
2021-10-27 23:05:25 +08:00
ValKmjolnir
183446d32a
bug fixed
2021-10-26 22:34:02 +08:00
ValKmjolnir
bbee31ea55
add detail crash info
2021-10-17 22:57:45 +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
Li Haokun
618ce59233
bad access bug fixed
2021-09-13 19:55:03 +08:00
Li Haokun
59dc0d1423
add isnan
2021-08-27 17:43:01 +08:00
ValKmjolnir
638ec1c3a3
use same indentation
2021-08-09 21:30:18 +08:00
Li Haokun
90ac468aa9
update
2021-08-09 19:13:39 +08:00
ValKmjolnir
884b56ac09
bug fixed & raw string print
2021-07-21 00:20:25 +08:00
Valk Richard Li
00c6e3b4fd
nothing changed
2021-06-20 01:27:01 +08:00
Valk Richard Li
1ae47807eb
Add command line parameters & chr supports extended ASCII
2021-06-11 15:16:06 +08:00
Valk Richard Li
b25a1bc3f4
more efficient str2num
2021-06-05 20:42:58 +08:00
Valk Richard Li
a68bf85f04
bug fixed
...
a gc bug which causes fatal error.
add member value collect to make sure that nasal_val is not collected repeatedly.
use builtin_alloc in builtin function to avoid incorrect collection of value in use(gc_alloc).
change free_list to free_list[vm_type_size] to avoid too many calls of new/delete(but seems useless?)
but the most important thing is fixing this bug.
2021-05-31 19:10:59 +08:00
Valk Richard Li
144e6f45da
gc changed to mark-sweep
2021-03-27 01:08:05 +08:00
Valk Richard Li
a421470715
change map to unordered_map
2021-03-01 15:54:58 +08:00