Commit Graph

1140 Commits

Author SHA1 Message Date
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 4499bf7bac 📝 change makefile and update output format of --opcnt and --detail 2022-07-06 11:57:40 +08:00
ValKmjolnir 9110a44b90 📝 change name of some identifiers. shrink size of main stack. 2022-07-05 18:13:54 +08:00
ValKmjolnir fcfbf5ce77 optimize codes and delete unused variables 2022-07-05 00:49:38 +08:00
ValKmjolnir 7e25bc15e0 optimize vm 2022-07-04 00:16:04 +08:00
ValKmjolnir b5f839bebe 📝 change some identifiers' name. 2022-07-03 22:46:28 +08:00
ValKmjolnir 8cc483b82a optimize codes 2022-07-02 18:08:41 +08:00
ValKmjolnir 7124b22619 📝 update test files 2022-07-02 15:48:02 +08:00
ValKmjolnir f3ba80b41c 📝 unify code style of ./stl ./test 2022-07-02 13:53:50 +08:00
ValKmjolnir beba975ff0 change format of error info
parser now can report exact place where is lacking ';' or ','
2022-06-30 23:15:10 +08:00
ValKmjolnir 41d5e2013e 🚀 update test/httptest.nas and doc/.html 2022-06-24 15:47:53 +08:00
ValKmjolnir abf4e8b735 📝 update test/httptest.nas 2022-06-23 22:16:24 +08:00
ValKmjolnir 7e034320f8 📝 finish translation of README.md 2022-06-18 18:48:00 +08:00
ValKmjolnir deb3712499 📝 update README.md and README_zh.md 2022-06-18 16:35:21 +08:00
ValKmjolnir d231668ca0 📝 update doc/README_zh.md 2022-06-18 01:31:51 +08:00
ValKmjolnir 660a17ae7e 📝 add README_zh.md(haven't finished translation). 2022-06-18 00:30:43 +08:00
ValKmjolnir 7d75904fab 📝 update docs 2022-06-17 22:18:34 +08:00
ValKmjolnir 12affcde2b 📝 update test/hexdump.nas test/md5compare.nas 2022-06-16 18:21:11 +08:00
ValKmjolnir 9d4a0e1b1f 📝 update stl/process_bar.nas 2022-06-16 01:03:51 +08:00
ValKmjolnir 031c56b08b 📝 update stl/process_bar.nas and test/md5compare.nas 2022-06-15 20:21:03 +08:00
ValKmjolnir bc90022dff 🚀 add stl/log.nas and stl/process_bar.nas 2022-06-15 00:36:49 +08:00
ValKmjolnir 60952e1d2f 🚀 add os.time() to get the local time string 2022-06-12 19:08:31 +08:00
ValKmjolnir b8283c5743 📝 optimize stl/fg_env.nas 2022-06-12 16:55:59 +08:00
ValKmjolnir d4d21f7af3 📝 update stl/fg_env.nas 2022-06-11 20:53:13 +08:00
ValKmjolnir 11d493c9e0 🐛 fix bug of forindex/foreach, which will cause SIGSEGV.
example:

var a=func{};
forindex(a();[0,1,2]);
2022-06-11 13:55:10 +08:00
ValKmjolnir 503b834f05 📝 update test/httptest.nas 2022-06-11 12:49:26 +08:00
ValKmjolnir 17495f12f9 📝 update test/httptest.nas 2022-06-08 20:01:22 +08:00
ValKmjolnir 20a4a4df4e 🚀 finish socket library:
socket.socket()

socket.closesocket()

socket.shutdown()

socket.bind()

socket.listen()

socket.connect()

socket.accept()

socket.send() socket.sendto()

socket.recv() socket.recvfrom()

socket.errno()
2022-06-08 19:06:16 +08:00
ValKmjolnir a166134cc5 🚀 add module/libsock.nas, preparing to add socket lib into this language. 2022-06-06 16:34:21 +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 c17ab5f46a 🐛 fix unix.isdir & unix.isfile 2022-06-03 21:53:14 +08:00
ValKmjolnir 954310293d add u32 and() xor() or() nand() not() 2022-06-03 21:34:02 +08:00
ValKmjolnir c1808a7875 🚀 use ftime to calculate run time 2022-06-02 22:51:43 +08:00
ValKmjolnir ece6142475 🚀 add stl/fg_env.nas & delete test/props props_sim maketimer_sim.nas 2022-05-31 20:36:39 +08:00
ValKmjolnir 9194c966c8 🐛 visual changement & bug fix in test/json.nas & optimize test/bp.nas 2022-05-30 21:27:24 +08:00
ValKmjolnir e2086e352f 📝 update README.md 2022-05-25 14:05:58 +08:00
ValKmjolnir f92089b90a 📝 add maketimer_multi_coroutine_test(vm_num) in test/maketimer_sim.nas 2022-05-23 22:12:58 +08:00
ValKmjolnir 6ee0ce9398 🐛 fix bug that gc cannot mark values in coroutine & add maketimer_sim.nas
update props_sim.nas

update auto_crash.nas
2022-05-23 20:23:20 +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 b4aad5249b 🎨 fix a bug in module/keyboard.cpp that if program exited with an error, the terminal may not echo the text you input 2022-05-20 21:42:28 +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 2542f4e43e 📝 update test/module_test.nas v9.0 2022-05-17 21:48:08 +08:00
ValKmjolnir 387d44f9cb 📝 update test files 2022-05-17 18:22:24 +08:00