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
86ae3aeee2
🐛 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
6266719fc1
⚡ optimize builtin_split.
2022-07-07 18:07:24 +08:00
ValKmjolnir
ec308f8053
⚡ 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
fe808f6d9f
🚀 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
a402e6d7d2
🚀 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
3d1e3f49dc
📝 change identifiers' name and test/coroutine.nas, test/filesystem.nas
2022-07-06 16:04:21 +08:00
ValKmjolnir
60952e1d2f
🚀 add os.time() to get the local time string
2022-06-12 19:08:31 +08:00
ValKmjolnir
ec2866021f
✨ add native function runtime.argv() to get command line arguments
2022-06-04 20:12:00 +08:00
ValKmjolnir
6f709f30f5
🚀 add native function println & add test/occupation.nas
2022-06-04 19:22:28 +08:00
ValKmjolnir
954310293d
⚡ add u32 and() xor() or() nand() not()
2022-06-03 21:34:02 +08:00
ValKmjolnir
8b63c44266
⚡ optimize codes
2022-05-22 18:19:13 +08:00
ValKmjolnir
c47bc7b881
⚡ optimize codes: store upvalue on stack & debugger now can output information of registers
2022-05-20 21:19:43 +08:00
ValKmjolnir
8915a9b96a
🚀 add coroutine library(beta) and lib function settimer&maketimestamp
2022-05-19 20:09:23 +08:00
ValKmjolnir
9364789896
🐛 now builtin_md5 uses unsigned char instead of char
2022-05-15 20:35:20 +08:00
ValKmjolnir
7f51676833
🎨 improve rawstr() and builtin_getcwd(..), change format output in nasal_vm::valinfo()
2022-05-07 02:22:49 +08:00
ValKmjolnir
3e418dbcff
🐛 bug fix
2022-05-06 20:58:02 +08:00
ValKmjolnir
3854e582a2
add test file diff.nas
2022-04-30 20:00:15 +08:00
ValKmjolnir
f4bac99a3a
optimize codes
2022-04-13 19:08:06 +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
ad60aecdee
change module/libmd5 to native function builtin_md5() in nasal_builtin.h
2022-04-06 22:30:49 +08:00
ValKmjolnir
0b4db9467e
add native function abort(), assert()
2022-04-06 21:25:20 +08:00
ValKmjolnir
8b7e0e5181
add native function: srand, values, find.
2022-04-05 22:15:05 +08:00
ValKmjolnir
b92930cb71
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
1adeb2ed77
update test/md5compare.nas & optimize test/md5.nas
2022-03-31 19:31:00 +08:00
ValKmjolnir
51e9b0b5ab
add math.pow
2022-03-27 16:14:55 +08:00
ValKmjolnir
1d5e2f5654
add unix.waitpid
2022-03-16 18:44:38 +08:00
ValKmjolnir
b61e7dfcb3
update docs & fix bug in nasal_builtin.h
2022-03-16 15:30:34 +08:00
ValKmjolnir
7ef9dd9371
change enum obj_type to nasal_obj::obj_type
2022-03-15 22:51:14 +08:00
ValKmjolnir
19db83a7f0
add destructors for obj_file, obj_dylib, obj_dir & bug fix
2022-03-13 00:11:50 +08:00
ValKmjolnir
34a59db9c4
add destructor for obj_file & change arguments in test/tetris.nas
2022-03-12 23:37:16 +08:00
ValKmjolnir
4bbeaa10b5
visual update
2022-03-10 16:05:49 +08:00
ValKmjolnir
88ed64caf2
change nasal_ref value option functions' output types from pointers to references
2022-03-09 22:54:54 +08:00
ValKmjolnir
8309a6211a
add unix.fork&unix.pipe(do not work on windows platform)
2022-03-09 19:03:12 +08:00
ValKmjolnir
c00f1a2103
delete lstk&fstk, store local address and function on stack and in vm registers
2022-03-08 17:30:40 +08:00
ValKmjolnir
5ac882c01e
update num->string algorithm, now the to_string will output strings with no tailing zeros
2022-03-08 13:40:27 +08:00
ValKmjolnir
b786dd0209
safer stl/module.nas & add stl/file.nas encapsulated from lib.nas/io
2022-03-06 15:17:39 +08:00
ValKmjolnir
15c5fbb1fb
add module.nas to safely use dylib
2022-03-05 21:52:29 +08:00
ValKmjolnir
9eddf0b3cf
try fix bug 'use of undeclared identifier 'environ'' on MacOS
2022-03-05 19:24:33 +08:00
ValKmjolnir
ebb601abbf
add unix.environ() & use LPCWSTR in dylib.dlopen on Windows platform
2022-03-05 19:15:52 +08:00
ValKmjolnir
7d602cf6ca
update
2022-03-01 14:36:05 +08:00
ValKmjolnir
2be7324cde
change parameter name in native function split.
2022-02-17 23:34:58 +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
6908e509ac
add notes in lib.nas & add runtime.gc() & add total instruction count in '-o'.
2022-02-09 15:53:09 +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
93c0c47762
change error info of native function __builtin_import
2022-01-31 14:48:51 +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
a51b7fe11a
optimize codes
2022-01-16 22:48:00 +08:00