mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
WASM: use signed comparison for lookupswitch
This commit is contained in:
parent
63025a57b7
commit
54accaff5b
|
@ -790,7 +790,7 @@ class WasmGenerationVisitor implements StatementVisitor, ExprVisitor {
|
|||
} else {
|
||||
int mid = (upper + lower) / 2;
|
||||
int label = entries.get(mid).label;
|
||||
WasmExpression condition = new WasmIntBinary(WasmIntType.INT32, WasmIntBinaryOperation.GT_UNSIGNED,
|
||||
WasmExpression condition = new WasmIntBinary(WasmIntType.INT32, WasmIntBinaryOperation.GT_SIGNED,
|
||||
new WasmGetLocal(conditionVar), new WasmInt32Constant(label));
|
||||
WasmConditional conditional = new WasmConditional(condition);
|
||||
consumer.getBody().add(conditional);
|
||||
|
|
Loading…
Reference in New Issue
Block a user