Commit Graph

199 Commits

Author SHA1 Message Date
ValKmjolnir 899b327608 📝 fix error in README.md 2022-07-24 17:15:44 +08:00
ValKmjolnir c702f02a8a 📝 change README.md & README_zh.md 2022-07-24 17:05:36 +08:00
ValKmjolnir afbee18e26 📝 update README.md & README_zh.md 2022-07-24 13:01:42 +08:00
ValKmjolnir c6129267aa 📝 update docs 2022-07-24 00:10:26 +08:00
ValKmjolnir 6187395ce8 📝 split README.md to doc/benchmark.md doc/dev.md doc/dev_zh.md 2022-07-23 23:04:31 +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 f68a512845 📝 shrink size of README.md 2022-07-20 22:22:50 +08:00
ValKmjolnir f7cd3a027b 📝 change README.md 2022-07-20 00:06:00 +08:00
ValKmjolnir cc4ff38f28 optimize codes 2022-07-19 23:55:12 +08:00
ValKmjolnir fc7e0a569e 📝 update docs. 2022-07-16 17:58:01 +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 2ed20f6362 📝 change some identifiers' name. 2022-07-09 16:24:58 +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 b638708722 📝 change identifiers' name and test/coroutine.nas, test/filesystem.nas 2022-07-06 16:04:21 +08:00
ValKmjolnir 92d68b357c optimize vm 2022-07-04 00:16:04 +08:00
ValKmjolnir abbdb22478 📝 update README.md and README_zh.md 2022-06-18 16:35:21 +08:00
ValKmjolnir bb84c6d143 📝 add README_zh.md(haven't finished translation). 2022-06-18 00:30:43 +08:00
ValKmjolnir e27f773749 📝 update docs 2022-06-17 22:18:34 +08:00
ValKmjolnir 6b20e0f167 🚀 add os.time() to get the local time string 2022-06-12 19:08:31 +08:00
ValKmjolnir 21b345af27 📝 update test/httptest.nas 2022-06-11 12:49:26 +08:00
ValKmjolnir 882ecac100 📝 update README.md 2022-05-25 14:05:58 +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 23a5c1b1ad 🐛 bug fix 2022-05-06 20:58:02 +08:00
ValKmjolnir c4b7712e53 update README.md 2022-04-27 12:49:29 +08:00
ValKmjolnir 4503239731 change STACK_MAX_DEPTH to nasal_gc::stack_depth 2022-04-09 23:14:28 +08:00
ValKmjolnir a2b51fe212 optimize libmd5.nas & test/md5.nas 2022-04-03 18:10:00 +08:00
ValKmjolnir 7f22b25909 update README.md 2022-03-27 01:36:38 +08:00
ValKmjolnir c4d52a88cd update docs & fix bug in nasal_builtin.h 2022-03-16 15:30:34 +08:00
ValKmjolnir 9a099f66cb update docs 2022-03-14 20:29: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 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 f312250d27 update 2022-03-01 14:36:05 +08:00
ValKmjolnir 9456a903d7 finish tetris.nas 2022-02-21 17:10:13 +08:00
ValKmjolnir 13a09343e6 update README.md 2022-02-18 15:59:27 +08:00
ValKmjolnir 5f6051e333 change tutorial's place in README.md 2022-02-15 23:42:17 +08:00
ValKmjolnir 0291908675 update README.md 2022-02-14 17:29:26 +08:00
ValKmjolnir 5fba784d05 add new gc type vm_upval 2022-02-13 22:40:54 +08:00
ValKmjolnir 9139e34c0b update README & bug fixed 2022-02-13 16:10:02 +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 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 0a407437a4 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 b92eb4b089 update README.md 2022-01-25 15:02:57 +08:00
ValKmjolnir 5778d1e38d update new test data 2022-01-24 15:19:27 +08:00
ValKmjolnir 479e5a2c52 fix errors in README.md 2022-01-22 22:19:14 +08:00
ValKmjolnir 2f455c52c1 fix error in README.md 2022-01-22 22:09:00 +08:00
ValKmjolnir 78c1f9b7a9 add contents in README.md 2022-01-22 22:05:42 +08:00
ValKmjolnir 1923fc74e4 update README.md 2021-12-23 21:46:53 +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 5a80258d20 bug fixed & add os.platform 2021-12-08 18:46:32 +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 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
ValKmjolnir 58ea303202 complete simple tutorial 2021-10-14 13:42:07 +08:00
ValKmjolnir 818685c48d change output format of information of bytecodes 2021-10-13 22:59:15 +08:00
ValKmjolnir 5d13261516 optimize source code 2021-10-12 18:26:10 +08:00
ValKmjolnir 1733ac0573 vm_nil,vm_num changed to no-gcobject 2021-10-08 23:18:26 +08:00
Li Haokun 35fc848672
fully functional closure 2021-08-11 14:54:17 +08:00
Li Haokun e3f3bd7387
update readme 2021-08-10 17:55:49 +08:00
ValKmjolnir 5b6c78783e update README 2021-08-04 00:03:49 +08:00
Li Haokun fa618eb97f
variables can be used before definition
change program to command line
change trace back info
change print function of nasal_vec and nasal_hash
2021-08-03 18:55:11 +08:00
ValKmjolnir 91771297d3 add test file 2021-08-01 22:34:02 +08:00
ValKmjolnir 4e1a3c5f2d syntax bug fixed
syntax like:
var f=func(){}
(var a,b,c)=(1,2,3);
will be incorrectly recognized like:
var f=func(){}(var a,b,c)

this bug is fixed now.
2021-08-01 02:11:27 +08:00
ValKmjolnir df634cb1b2 update readme:difference between this and andy's interpreter 2021-08-01 01:54:14 +08:00
Li Haokun 7a93f5b89b
update 2021-07-19 17:04:45 +08:00
Li Haokun 9fe7a86a3b
add trace back info 2021-07-16 17:18:13 +08:00
ValKmjolnir 0b2fe61e6e add instruction & changes in codegen
add some instructions that execute const values.
the first symbol called in assignment will use op_load instead of op_meq,op_pop to assign.
2021-06-29 17:18:05 +08:00
ValKmjolnir 706659ba3d change instruction dispatch to computed-goto
bug fixed
prepare for version 7.0
2021-06-26 14:53:10 +08:00
ValKmjolnir fd57e9a47c performance optimization of vm/lex/parse/test 2021-06-24 00:26:26 +08:00
ValKmjolnir ab99d2d1ed change mcall to call->mcall&allow differen lvalue in assignment 2021-06-21 16:46:47 +08:00
Valk Richard Li 00c6e3b4fd nothing changed 2021-06-20 01:27:01 +08:00
Valk Richard Li cdf7b92a8e add statistical information 2021-06-19 00:32:10 +08:00
Valk Richard Li 4f3ddf803a add tips 2021-06-13 01:01:32 +08:00
Valk Richard Li de305d26ad fixed an error in README 2021-06-12 01:23:06 +08:00
Valk Richard Li 9f30f45774 Update README.md 2021-06-11 15:28:25 +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 3deea632f8 front end optimization&stack overflow prompt
change parameter type to avoid unnecessary copies of string.
change stack depth from 65536<<4 to 16+(65536<<2).
now you could know stack overflow when it happens
2021-06-07 23:53:43 +08:00
Valk Richard Li fd7677f94f update README.md(some history of this project)
AND a question of admins' brains of gitee
2021-06-05 17:15:07 +08:00
Valk Richard Li 2e31a70406 Update README.md 2021-06-03 21:59:15 +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 a463af53b7 add license & other changes
parser recognizes syntax errors more accurately.
change some for loop to standard c++11 for(auto iter:obj)
add MIT license
change info in README.md
2021-05-04 17:39:24 +08:00
Valk Richard Li 6adb991c04 parser reports syntax error accurately
still need improvement
2021-05-04 01:13:53 +08:00
Valk Richard Li c5f4736984 change scope from unordered_map to vector 2021-04-19 19:12:41 +08:00
Valk Richard Li a7d6518bff add test file & update README 2021-04-04 23:35:13 +08:00
Valk Richard Li 0700ce14f7 change function of vapp & README update 2021-04-03 23:47:14 +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
Valk Richard Li 1c40cca673 add tutorial of how to add built-in function 2021-02-23 23:33:01 +08:00
Valk Richard Li 767711c93a change identifier name to avoid misunderstanding 2021-02-15 15:29:55 +08:00
Valk Richard Li 996ac59c79 update parser to LL(1) 2021-02-13 13:28:20 +08:00
Valk Richard Li 125d6d3a7d update 2021-01-23 19:21:37 +08:00
Valk Richard Li 9f30440286 preparation for v5.0 2020-12-19 01:26:15 +08:00
Valk Richard Li 09e5b3fa90 Update README.md 2020-12-12 20:13:23 +08:00
Valk Richard Li e9fd953273 update 2020-11-20 00:18:17 +08:00
Valk Richard Li e8341c7b06 change project structure
version 3.0
2020-10-23 14:53:04 +08:00