mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
wasm gc: fix issue in type inference for comparison instruction result
This commit is contained in:
parent
0b11a9ce90
commit
1ba1dcfc09
|
@ -30,6 +30,7 @@ import org.teavm.model.instructions.AbstractInstructionVisitor;
|
||||||
import org.teavm.model.instructions.ArrayLengthInstruction;
|
import org.teavm.model.instructions.ArrayLengthInstruction;
|
||||||
import org.teavm.model.instructions.AssignInstruction;
|
import org.teavm.model.instructions.AssignInstruction;
|
||||||
import org.teavm.model.instructions.BinaryInstruction;
|
import org.teavm.model.instructions.BinaryInstruction;
|
||||||
|
import org.teavm.model.instructions.BinaryOperation;
|
||||||
import org.teavm.model.instructions.BoundCheckInstruction;
|
import org.teavm.model.instructions.BoundCheckInstruction;
|
||||||
import org.teavm.model.instructions.CastInstruction;
|
import org.teavm.model.instructions.CastInstruction;
|
||||||
import org.teavm.model.instructions.CastIntegerInstruction;
|
import org.teavm.model.instructions.CastIntegerInstruction;
|
||||||
|
@ -365,6 +366,10 @@ public abstract class BaseTypeInference<T> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visit(BinaryInstruction insn) {
|
public void visit(BinaryInstruction insn) {
|
||||||
|
if (insn.getOperation() == BinaryOperation.COMPARE) {
|
||||||
|
type(insn.getReceiver(), ValueType.INTEGER);
|
||||||
|
return;
|
||||||
|
}
|
||||||
type(insn.getReceiver(), insn.getOperandType());
|
type(insn.getReceiver(), insn.getOperandType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user