mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-23 00:24:11 -08:00
Disables loop invariant motion for arrays
This commit is contained in:
parent
084de3374e
commit
45d0a10c8d
|
@ -1334,7 +1334,7 @@ public class TBigInteger extends Number implements Comparable<TBigInteger>, Seri
|
||||||
throw new ArithmeticException("BigInteger: modulus not positive");
|
throw new ArithmeticException("BigInteger: modulus not positive");
|
||||||
}
|
}
|
||||||
TBigInteger rem = remainder(m);
|
TBigInteger rem = remainder(m);
|
||||||
return ((rem.sign < 0) ? rem.add(m) : rem);
|
return rem.sign < 0 ? rem.add(m) : rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -340,7 +340,8 @@ public class LoopInvariantMotion implements MethodOptimization {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visit(ArrayLengthInstruction insn) {
|
public void visit(ArrayLengthInstruction insn) {
|
||||||
canMove = true;
|
// TODO: Sometimes we can cast NPE when array is null and its length is read only in certain cases
|
||||||
|
//canMove = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -349,7 +350,8 @@ public class LoopInvariantMotion implements MethodOptimization {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visit(UnwrapArrayInstruction insn) {
|
public void visit(UnwrapArrayInstruction insn) {
|
||||||
canMove = true;
|
// TODO: Sometimes we can cast NPE when array is null and is is unwrapped only in certain cases
|
||||||
|
//canMove = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user