update README & bug fixed

This commit is contained in:
ValKmjolnir
2022-02-13 16:10:02 +08:00
parent e7f503fae1
commit 9139e34c0b
7 changed files with 191 additions and 193 deletions
+4 -4
View File
@@ -39,6 +39,7 @@ protected:
void die(std::string);
/* vm calculation functions*/
bool condition(nasal_ref);
/* vm operands */
void opr_nop();
void opr_intg();
void opr_intl();
@@ -132,6 +133,9 @@ void nasal_vm::init(
str_table=strs.data();
files=filenames.data();
files_size=filenames.size();
/* set canary and program counter */
canary=gc.stack+STACK_MAX_DEPTH-1;
pc=0;
}
void nasal_vm::valinfo(nasal_ref& val)
{
@@ -900,10 +904,6 @@ void nasal_vm::run(
code.push_back(opr_table[i.op]);
imm.push_back(i.num);
}
// set canary and program counter
canary=gc.stack+STACK_MAX_DEPTH-1;
pc=0;
// goto the first operand
goto *code[pc];