Fix local data
This commit is contained in:
@@ -1421,6 +1421,8 @@ class CallFunctionCode : Code
|
||||
//TODO:args
|
||||
auto bp = vm.stacki;
|
||||
vm.push(Value(vm.currentData));
|
||||
vm.currentData.index = 0;
|
||||
vm.currentData.table = func.scope_.data;
|
||||
vm.push(Value(vm.bp));
|
||||
vm.pushpc;//vm.push(Value(vm.pc));
|
||||
vm.bp = bp;
|
||||
@@ -1494,6 +1496,8 @@ class CallFunctionS : Code
|
||||
//TODO:args
|
||||
auto bp = vm.stacki;
|
||||
vm.push(Value(vm.currentData));
|
||||
vm.currentData.index = 0;
|
||||
vm.currentData.table = func.scope_.data;
|
||||
vm.push(Value(vm.bp));
|
||||
vm.pushpc;//vm.push(Value(vm.pc));
|
||||
vm.bp = bp;
|
||||
|
||||
@@ -67,6 +67,7 @@ class Scope
|
||||
{
|
||||
this();
|
||||
this.func = func;
|
||||
func.scope_ = this;
|
||||
}
|
||||
}
|
||||
class DataTable
|
||||
@@ -94,6 +95,7 @@ class Function
|
||||
int[wstring] label;
|
||||
bool returnExpr;
|
||||
int outArgCount;
|
||||
Scope scope_;
|
||||
bool isCommon;
|
||||
VMSlot slot;/*common function*/
|
||||
bool isDead;/*common function*/
|
||||
|
||||
Reference in New Issue
Block a user