Commit Graph

296 Commits

Author SHA1 Message Date
ValKmjolnir 788e0026c2 optimize location info gen in codegen
and refactor lib.nas, add multiple native modules
2023-07-23 23:57:25 +08:00
ValKmjolnir 51a0ef6b0c 📝 add logprint & change libs 2023-07-23 18:30:32 +08:00
ValKmjolnir 31113ff69f 📝 delete std/sort.nas & update test file 2023-07-23 00:30:14 +08:00
ValKmjolnir fe65085a7a add check for self-imported module 2023-07-21 23:40:59 +08:00
ValKmjolnir d479f13a5c support nasal module 2023-07-20 00:54:57 +08:00
ValKmjolnir fe3847d69c add experimental namespace table 2023-07-16 21:31:51 +08:00
ValKmjolnir eee30b7d8e add concurrent mark for experiment 2023-07-16 00:37:11 +08:00
ValKmjolnir 4a7a2ce11e 🐛 fix bug in special argument "arg"
if defining a parameter named "arg", this will cause
error value of the last local variable of this function
2023-07-11 19:09:33 +08:00
ValKmjolnir 32e23741eb add concat for vector 2023-07-09 16:45:10 +08:00
ValKmjolnir 7e72661332 🐛 complete function of arg in all scopes 2023-07-09 16:21:09 +08:00
ValKmjolnir 3509655424 add special variable "arg" 2023-07-09 00:59:17 +08:00
ValKmjolnir fd614a132c 📝 add new test file feigenbaum.nas 2023-07-07 19:55:29 +08:00
ValKmjolnir b4482792c8 🧑‍💻 add important symbol "globals" 2023-07-06 22:10:07 +08:00
ValKmjolnir eca6141408 optimize codegen 2023-07-05 00:24:34 +08:00
ValKmjolnir ac2744e24f change build scripts 2023-07-02 19:48:36 +08:00
ValKmjolnir ba6b7cd05c change dir stl -> std 2023-07-02 16:17:56 +08:00
ValKmjolnir 90ad1a53d7 update 2023-07-01 00:55:00 +08:00
ValKmjolnir 9bf4eacc62 prepare to use new ast 2023-06-05 00:11:37 +08:00
ValKmjolnir 774ad60c42 add global_ghost_type_table for test 2023-05-10 00:48:04 +08:00
ValKmjolnir f914678311 add readline & os.arch
delete test file mandel.nas

change io.fin => io.readfile
2023-04-28 23:11:17 +08:00
ValKmjolnir 94f7c941f6 🐛 fix compilation error in VS 2023-04-12 19:44:13 +08:00
ValKmjolnir 5519dc7a29 merge runtime regs into struct context 2023-04-08 00:18:58 +08:00
ValKmjolnir 4e17de909a update test/jsonrpc.nas 2023-03-25 21:26:49 +08:00
ValKmjolnir 73450092f2 add test/jsonrpc.nas and fix bug
bug: in nasocket.cpp, recv and recvfrom do not place 0 after reciving
data into the buffer.
2023-03-23 00:09:51 +08:00
ValKmjolnir f8bac92548 📝 update test file datalog.nas 2023-03-14 00:16:54 +08:00
ValKmjolnir 7cdc5e40af visual update 2023-03-11 18:15:27 +08:00
ValKmjolnir bd12fe917a add new operand calculate const and pop 2023-03-10 22:27:06 +08:00
ValKmjolnir 8161f3c514 optimize codegen 2023-03-09 23:00:25 +08:00
ValKmjolnir abe2464a67 📝 shorten the running time of test process 2023-03-02 00:36:48 +08:00
ValKmjolnir f9cbd0b426 add error report info in stl/mat 2023-03-02 00:26:52 +08:00
ValKmjolnir 99434df819 🚀 add more matrix operation in stl/mat.nas
and bp example test
2023-03-01 23:37:13 +08:00
ValKmjolnir e11793d340 🚀 add operator `^=` `&=` `|=`
fix bug of parsing expressions beginning with floater
2023-02-28 00:30:27 +08:00
ValKmjolnir c8eb1f1d16 🚀 add bitwise operators or, xor, and 2023-02-16 00:24:32 +08:00
ValKmjolnir 068184f451 🐛 fix codegen for binary not on some ast nodes 2023-02-12 15:33:38 +08:00
ValKmjolnir 368b057a91 🚀 add binary negation 2023-02-12 15:22:05 +08:00
ValKmjolnir 79c1e27027 🐛 fix bug in test/calc.nas 2023-02-03 19:01:00 +08:00
ValKmjolnir 84f9280cb4 🚀 add test file auto-push.nas 2023-02-02 21:28:11 +08:00
ValKmjolnir e454b315fc 🚀 add file::find_all_files_with_extension 2023-02-02 21:24:21 +08:00
ValKmjolnir acb2e3664c 🐛 fix bugs in stl/json, now it runs correctly 2023-01-31 19:39:22 +08:00
ValKmjolnir 22b1841664 update test/ascii-art.nas 2023-01-30 19:13:08 +08:00
ValKmjolnir aef7936292 optimize test files
httptest.nas: when clicking mandel.nas link, this may cause memory overflow in new gc
2023-01-23 23:14:34 +08:00
ValKmjolnir d03273b4e1 add keyword support 'true' and 'false'
true is now number 1.0

false is number 0.0
2023-01-16 17:44:56 +08:00
ValKmjolnir 48611c50f7 🚀 coroutine.resume can pass arguments 2023-01-02 18:53:58 +08:00
ValKmjolnir e6e89039b8 optimize code & add comments 2023-01-02 01:00:16 +08:00
ValKmjolnir 9d7f799ad3 update test file 'life.nas' 2022-12-27 18:25:58 +08:00
ValKmjolnir d5996d6a1d 🎨 change clean command in makefiles 2022-12-25 17:58:05 +08:00
ValKmjolnir 0d1069a724 optimize test file 2022-12-10 01:24:46 +08:00
ValKmjolnir 175706126b 🐛 fix dynamic arguments load bug in nasal_vm 2022-12-09 00:56:53 +08:00
ValKmjolnir cb547499ac optimize gc 2022-12-07 01:17:40 +08:00
ValKmjolnir de524938cf add runtime.gc.extend 2022-12-04 20:28:51 +08:00
ValKmjolnir 9c6996b54e update test files 2022-12-03 01:24:56 +08:00
ValKmjolnir eca978e2b3 little optimization 2022-11-30 01:11:26 +08:00
ValKmjolnir 4c5ffb0240 🎨 change code format 2022-11-26 22:49:22 +08:00
ValKmjolnir 54969681fc move lvalue check from parse to codegen 2022-11-20 17:06:13 +08:00
ValKmjolnir 9196d7815f 🎨 improve error report 2022-11-19 22:47:19 +08:00
ValKmjolnir 309a57070c 🚀 change module loading 2022-11-15 21:23:34 +08:00
ValKmjolnir 7e4faed4a6 🚀 add new native function `char` 2022-11-12 17:03:56 +08:00
ValKmjolnir f9179188a5 optimize test/console3D.nas 2022-11-11 00:37:14 +08:00
ValKmjolnir 97b3cefe75 add new ways of calling dylib function 2022-11-11 00:11:01 +08:00
ValKmjolnir ca527ec931 🚀 add new module matrix.cpp (in dev) 2022-11-06 23:30:18 +08:00
ValKmjolnir 4fd69c6ce4 🚀 optimize code 2022-11-06 18:20:10 +08:00
ValKmjolnir 1ced201cb5 🚀 add gc time info 2022-11-04 21:36:54 +08:00
ValKmjolnir cedb5e12f5 🚀 add test file `console3D.nas` 2022-11-04 01:18:38 +08:00
ValKmjolnir aaccfbda11 🐛 fix ast print bug & delete some macros 2022-10-30 18:40:03 +08:00
ValKmjolnir feea901e4d 🎨 improve code format
delete option -v, --version, -l, --lex
2022-10-30 01:26:26 +08:00
ValKmjolnir d121dcd630 🎨 improve format of code 2022-10-28 23:28:15 +08:00
ValKmjolnir c705b75513 🚀 change module function parameter format to avoid warnings 2022-10-24 01:12:25 +08:00
ValKmjolnir 025ff49ffc 🚀 add `stl/csv.nas` & ast name change 2022-10-19 00:54:21 +08:00
ValKmjolnir 7a93527948 add stl/json.nas & fix bug
bug: may cause program crash if stack overflow occurs on main stack
2022-10-08 21:34:47 +08:00
ValKmjolnir 405175061a 🚀 crashed coroutine will not make main thread crash. 2022-10-06 23:11:27 +08:00
ValKmjolnir e25eb76e94 🚀 delete unnecessary codes & add `stl/string.nas` 2022-10-05 16:03:47 +08:00
ValKmjolnir 946aa020a5 🚀 add high resolution progress bar 2022-09-28 23:45:15 +08:00
ValKmjolnir dc3770094a 🚀 update test file 2022-09-20 21:51:52 +08:00
ValKmjolnir 791de656c3 🚀 update `ascii-art.nas` and `stl/padding.nas` 2022-09-20 00:41:08 +08:00
ValKmjolnir cff9f91bee 🚀 move `pic` directory into `doc` 2022-09-19 00:10:08 +08:00
ValKmjolnir 0576459fbe 📝 add notes in test files & use system("color") to use ANSI esc seq 2022-09-14 23:15:36 +08:00
ValKmjolnir 518ce7fcb9 📝 add interesting gifs into docs 2022-09-13 23:00:48 +08:00
ValKmjolnir 26f4e1359f 🐛 fix bug that `int()` cannot convert numeric string 2022-09-12 22:45:35 +08:00
ValKmjolnir 6a6eab8db5 change parameter list of 2022-09-11 15:10:30 +08:00
ValKmjolnir 91b3074ce9 optimize `stl/sort.nas` and `test/calc.nas` 2022-09-10 15:45:25 +08:00
ValKmjolnir 10e579dabc 🐛 fix bug that word_collector.nas split some words incorrectly 2022-09-09 21:48:10 +08:00
ValKmjolnir add5e0c2cd 📝 update test file & add new test file `word_collector.nas` 2022-09-09 01:00:09 +08:00
ValKmjolnir 6c04487319 🚀 add new stl file `padding.nas` and update test files. 2022-09-04 17:53:00 +08:00
ValKmjolnir aa0023a23b 📝 use bold font in test/watchdog.nas 2022-09-01 00:04:14 +08:00
ValKmjolnir b022b25cea 🚀 add colorful error info print. 2022-08-31 00:56:19 +08:00
ValKmjolnir 8293f85c5b 🚀 add lib function `exit()` and add test file `watchdog.nas` to run the nasal file when it is changed. 2022-08-27 18:12:32 +08:00
ValKmjolnir 0e578b3e21 📝 update stl/file and test files. 2022-08-27 17:26:01 +08:00
ValKmjolnir 24ba300f3c 🔥 delete `--opcnt` and replace the function of `-o` by `--optimize`. 2022-08-25 19:54:03 +08:00
ValKmjolnir da8aa4744e 📝 add compilation time & update test/ppmgen.nas 2022-08-21 00:26:16 +08:00
ValKmjolnir caf048aae4 several updates.
1. merge `--chkpath` `-cp` with `-d`

2. complete test/ppmgen.nas

3. update comments about why we don't use `atof` to convert string to
number

4. update .gitignore
2022-08-19 23:25:46 +08:00
ValKmjolnir 007b83bed5 📝 add test file `ppmgen.nas` 2022-08-17 21:09:22 +08:00
ValKmjolnir 73278ea2dd 📝 update test/ascii-art.nas 2022-08-16 20:41:05 +08:00
ValKmjolnir 7ddb8593ad 🚀 optimize stl/stack.nas, test/calc.nas & io.fin now returns empty string when cannot open file 2022-08-07 00:35:55 +08:00
ValKmjolnir 04a45064c8 📝 delete unnecessary code & change test file. 2022-07-31 19:26:13 +08:00
ValKmjolnir 854850d9b1 🐛 fix bug of incorrectly searching paths of `lib.nas` and dynamic libs.
`dylib.dlopen` now only needs file name of dynamic lib, not the real path.
2022-07-29 22:49:50 +08:00
ValKmjolnir e9fc70bba8 optimize `op_para` and `op_deft`: change `hashmap<string,u64>` to `hashmap<u32,u32>` 2022-07-23 12:02:41 +08:00
ValKmjolnir cc4ff38f28 optimize codes 2022-07-19 23:55:12 +08:00
ValKmjolnir d904123695 🐛 fix bug in test/module_test.nas 2022-07-17 23:46:37 +08:00
ValKmjolnir 29084143d6 📝 change codes in test files. 2022-07-14 19:52:27 +08:00
ValKmjolnir 2ed20f6362 📝 change some identifiers' name. 2022-07-09 16:24:58 +08:00