mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-23 00:24:11 -08:00
Fix bug in fillZero function
This commit is contained in:
parent
375506e875
commit
c5c453d95b
|
@ -203,14 +203,14 @@ public final class WasmRuntime {
|
||||||
address.putInt(0);
|
address.putInt(0);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
address.add(1).putByte((byte) 0);
|
address.add(3).putByte((byte) 0);
|
||||||
address.add(2).putShort((short) 0);
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
address.add(2).putShort((short) 0);
|
address.add(2).putShort((short) 0);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
address.add(3).putByte((byte) 0);
|
address.add(1).putByte((byte) 0);
|
||||||
|
address.add(2).putShort((short) 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ public final class WasmRuntime {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (address = Address.fromInt(alignedStart); address.toInt() < alignedEnd; address = address.add(4)) {
|
for (address = Address.fromInt(alignedStart + 1); address.toInt() < alignedEnd; address = address.add(4)) {
|
||||||
address.putInt(0);
|
address.putInt(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,6 @@ class WasmGenerationVisitor implements StatementVisitor, ExprVisitor {
|
||||||
private Map<IdentifiedStatement, WasmBlock> continueTargets = new HashMap<>();
|
private Map<IdentifiedStatement, WasmBlock> continueTargets = new HashMap<>();
|
||||||
private Set<WasmBlock> usedBlocks = new HashSet<>();
|
private Set<WasmBlock> usedBlocks = new HashSet<>();
|
||||||
private List<Deque<WasmLocal>> temporaryVariablesByType = new ArrayList<>();
|
private List<Deque<WasmLocal>> temporaryVariablesByType = new ArrayList<>();
|
||||||
private List<WasmLocal> currentTemporaries = new ArrayList<>();
|
|
||||||
WasmExpression result;
|
WasmExpression result;
|
||||||
|
|
||||||
WasmGenerationVisitor(WasmGenerationContext context, WasmClassGenerator classGenerator,
|
WasmGenerationVisitor(WasmGenerationContext context, WasmClassGenerator classGenerator,
|
||||||
|
@ -1275,7 +1274,6 @@ class WasmGenerationVisitor implements StatementVisitor, ExprVisitor {
|
||||||
variable = new WasmLocal(type);
|
variable = new WasmLocal(type);
|
||||||
function.add(variable);
|
function.add(variable);
|
||||||
}
|
}
|
||||||
currentTemporaries.add(variable);
|
|
||||||
return variable;
|
return variable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user