📝 update docs

This commit is contained in:
ValKmjolnir
2024-05-17 00:10:24 +08:00
parent ad87298737
commit 2c851613ce
4 changed files with 326 additions and 316 deletions

View File

@@ -1,13 +1,29 @@
# runtime.nas
# 2023 by ValKmjolnir
# runtime gives us some functions that we could manage it manually.
# command line arguments
var argv = func() {
return globals.arg;
}
var gc = {
extend: func(type) {return __gcextd;},
info: func() {return __gcinfo;}
};
# runtime.nas
# 2023 by ValKmjolnir
# runtime gives us some functions that we could manage it manually.
# command line arguments
var argv = func() {
return globals.arg;
}
var _gc_extend = func(type) {
return __gcextd;
}
var gc = {
extend: func(type, times = 1) {
if (times<=0) {
return nil;
}
if (times>16) {
times = 16;
}
for(var i = 0; i<times; i+=1) {
_gc_extend(type);
}
return nil;
},
info: func() {return __gcinfo;}
};