mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -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);
|
||||
break;
|
||||
case 1:
|
||||
address.add(1).putByte((byte) 0);
|
||||
address.add(2).putShort((short) 0);
|
||||
address.add(3).putByte((byte) 0);
|
||||
break;
|
||||
case 2:
|
||||
address.add(2).putShort((short) 0);
|
||||
break;
|
||||
case 3:
|
||||
address.add(3).putByte((byte) 0);
|
||||
address.add(1).putByte((byte) 0);
|
||||
address.add(2).putShort((short) 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ public final class WasmRuntime {
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,6 @@ class WasmGenerationVisitor implements StatementVisitor, ExprVisitor {
|
|||
private Map<IdentifiedStatement, WasmBlock> continueTargets = new HashMap<>();
|
||||
private Set<WasmBlock> usedBlocks = new HashSet<>();
|
||||
private List<Deque<WasmLocal>> temporaryVariablesByType = new ArrayList<>();
|
||||
private List<WasmLocal> currentTemporaries = new ArrayList<>();
|
||||
WasmExpression result;
|
||||
|
||||
WasmGenerationVisitor(WasmGenerationContext context, WasmClassGenerator classGenerator,
|
||||
|
@ -1275,7 +1274,6 @@ class WasmGenerationVisitor implements StatementVisitor, ExprVisitor {
|
|||
variable = new WasmLocal(type);
|
||||
function.add(variable);
|
||||
}
|
||||
currentTemporaries.add(variable);
|
||||
return variable;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user