ValKmjolnir
d1a7d32e7b
📝 fix some wanings.
2022-07-11 23:53:23 +08:00
ValKmjolnir
2ed20f6362
📝 change some identifiers' name.
2022-07-09 16:24:58 +08:00
ValKmjolnir
9890b46f02
⚡ optimize code.
2022-07-08 23:00:36 +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
c1d13ecd85
🐛 fix a bug that split doesn't work if delimeter's length is greater than 1.
2022-07-07 19:32:06 +08:00
ValKmjolnir
824a31ef55
⚡ optimize builtin_split.
2022-07-07 18:07:24 +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
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
b638708722
📝 change identifiers' name and test/coroutine.nas, test/filesystem.nas
2022-07-06 16:04:21 +08:00
ValKmjolnir
6b20e0f167
🚀 add os.time() to get the local time string
2022-06-12 19:08:31 +08:00
ValKmjolnir
a2e2d5d8f6
✨ add native function runtime.argv() to get command line arguments
2022-06-04 20:12:00 +08:00
ValKmjolnir
cb0fee04a9
🚀 add native function println & add test/occupation.nas
2022-06-04 19:22:28 +08:00
ValKmjolnir
c3a8e118f5
⚡ add u32 and() xor() or() nand() not()
2022-06-03 21:34:02 +08:00
ValKmjolnir
ebfacd9197
⚡ optimize codes
2022-05-22 18:19:13 +08:00
ValKmjolnir
07eeaadf96
⚡ optimize codes: store upvalue on stack & debugger now can output information of registers
2022-05-20 21:19:43 +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
de262980cc
🎨 improve rawstr() and builtin_getcwd(..), change format output in nasal_vm::valinfo()
2022-05-07 02:22:49 +08:00
ValKmjolnir
23a5c1b1ad
🐛 bug fix
2022-05-06 20:58:02 +08:00
ValKmjolnir
f049e1f9fb
add test file diff.nas
2022-04-30 20:00:15 +08:00
ValKmjolnir
ca073499ae
optimize codes
2022-04-13 19:08:06 +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
87cff700e8
change module/libmd5 to native function builtin_md5() in nasal_builtin.h
2022-04-06 22:30:49 +08:00
ValKmjolnir
bf5737ecfd
add native function abort(), assert()
2022-04-06 21:25:20 +08:00
ValKmjolnir
e846e51175
add native function: srand, values, find.
2022-04-05 22:15:05 +08:00
ValKmjolnir
aed5e27409
bug fix & optimize test code & add lib function: subvec, floor, abs, isfunc, isghost, isint, isnum, isscalar, isstr, isvec, vecindex(unfinished)
2022-04-04 18:38:25 +08:00
ValKmjolnir
83a8632e8e
update test/md5compare.nas & optimize test/md5.nas
2022-03-31 19:31:00 +08:00
ValKmjolnir
617ad03d33
add math.pow
2022-03-27 16:14:55 +08:00
ValKmjolnir
e6457651d3
add unix.waitpid
2022-03-16 18:44:38 +08:00
ValKmjolnir
c4d52a88cd
update docs & fix bug in nasal_builtin.h
2022-03-16 15:30:34 +08:00
ValKmjolnir
9bcad59e45
change enum obj_type to nasal_obj::obj_type
2022-03-15 22:51:14 +08:00
ValKmjolnir
b79d60fab5
add destructors for obj_file, obj_dylib, obj_dir & bug fix
2022-03-13 00:11:50 +08:00
ValKmjolnir
82e9e97a26
add destructor for obj_file & change arguments in test/tetris.nas
2022-03-12 23:37:16 +08:00
ValKmjolnir
f26719e1d3
visual update
2022-03-10 16:05:49 +08:00
ValKmjolnir
e54ef9620f
change nasal_ref value option functions' output types from pointers to references
2022-03-09 22:54:54 +08:00
ValKmjolnir
d8156e839b
add unix.fork&unix.pipe(do not work on windows platform)
2022-03-09 19:03:12 +08:00
ValKmjolnir
61666d275d
delete lstk&fstk, store local address and function on stack and in vm registers
2022-03-08 17:30:40 +08:00
ValKmjolnir
99f595e16f
update num->string algorithm, now the to_string will output strings with no tailing zeros
2022-03-08 13:40:27 +08:00
ValKmjolnir
debe32b187
safer stl/module.nas & add stl/file.nas encapsulated from lib.nas/io
2022-03-06 15:17:39 +08:00
ValKmjolnir
ca9b8581b4
add module.nas to safely use dylib
2022-03-05 21:52:29 +08:00
ValKmjolnir
a0b341deb5
try fix bug 'use of undeclared identifier 'environ'' on MacOS
2022-03-05 19:24:33 +08:00
ValKmjolnir
d3df356299
add unix.environ() & use LPCWSTR in dylib.dlopen on Windows platform
2022-03-05 19:15:52 +08:00
ValKmjolnir
f312250d27
update
2022-03-01 14:36:05 +08:00
ValKmjolnir
05fc5db337
change parameter name in native function split.
2022-02-17 23:34:58 +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
a176022840
add notes in lib.nas & add runtime.gc() & add total instruction count in '-o'.
2022-02-09 15:53:09 +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
baa4f5a258
change error info of native function __builtin_import
2022-01-31 14:48:51 +08:00