Fix
This commit is contained in:
@@ -744,6 +744,11 @@ class PopG : Code
|
|||||||
vm.currentSlot.global[var] = Value(cast(int)v.doubleValue);
|
vm.currentSlot.global[var] = Value(cast(int)v.doubleValue);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (g.isNonStringArray && v.isNonStringArray)
|
||||||
|
{
|
||||||
|
vm.currentSlot.global[var] = v;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(g.type == ValueType.Void)
|
if(g.type == ValueType.Void)
|
||||||
{
|
{
|
||||||
vm.currentSlot.global[var] = v;
|
vm.currentSlot.global[var] = v;
|
||||||
@@ -816,6 +821,11 @@ class PopL : Code
|
|||||||
vm.stack[vm.bp + var] = Value(cast(int)v.doubleValue);
|
vm.stack[vm.bp + var] = Value(cast(int)v.doubleValue);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (g.isNonStringArray && v.isNonStringArray)
|
||||||
|
{
|
||||||
|
vm.stack[vm.bp + var] = v;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(g.type == ValueType.Void)
|
if(g.type == ValueType.Void)
|
||||||
{
|
{
|
||||||
vm.stack[vm.bp + var] = v;
|
vm.stack[vm.bp + var] = v;
|
||||||
|
|||||||
@@ -1330,7 +1330,8 @@ class PetitComputer
|
|||||||
for(int i = 0; !quit && maincntRender == oldmaincnt && !waitFlag && running; i++)
|
for(int i = 0; !quit && maincntRender == oldmaincnt && !waitFlag && running; i++)
|
||||||
{
|
{
|
||||||
version (traceVM)
|
version (traceVM)
|
||||||
std.stdio.stderr.writefln("%04X:%s", vm.pc, vm.getCurrent.toString(vm));
|
if (vm.pc < vm.currentSlot.code.length)
|
||||||
|
std.stdio.stderr.writefln("%04X:%s", vm.pc, vm.getCurrent.toString(vm));
|
||||||
version (dumpStackVM)
|
version (dumpStackVM)
|
||||||
vm.dumpStack();
|
vm.dumpStack();
|
||||||
auto b = vm.runStep();
|
auto b = vm.runStep();
|
||||||
|
|||||||
@@ -184,6 +184,11 @@ struct Value
|
|||||||
return this.type == ValueType.IntegerArray || this.type == ValueType.DoubleArray ||
|
return this.type == ValueType.IntegerArray || this.type == ValueType.DoubleArray ||
|
||||||
this.type == ValueType.StringArray || this.type == ValueType.String;
|
this.type == ValueType.StringArray || this.type == ValueType.String;
|
||||||
}
|
}
|
||||||
|
bool isNonStringArray()
|
||||||
|
{
|
||||||
|
return this.type == ValueType.IntegerArray || this.type == ValueType.DoubleArray ||
|
||||||
|
this.type == ValueType.StringArray;
|
||||||
|
}
|
||||||
bool isNumberArray()
|
bool isNumberArray()
|
||||||
{
|
{
|
||||||
return this.type == ValueType.IntegerArray || this.type == ValueType.DoubleArray;
|
return this.type == ValueType.IntegerArray || this.type == ValueType.DoubleArray;
|
||||||
|
|||||||
Reference in New Issue
Block a user