mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix another bug in DFG simplifier. Fix long subtraction bug
This commit is contained in:
parent
0572123c0e
commit
31f6439652
|
@ -66,7 +66,7 @@ public class DataFlowGraphBuilder implements InstructionReader {
|
|||
startNodes.add(i);
|
||||
}
|
||||
for (int pred : graph.incomingEdges(i)) {
|
||||
if (importantNodes.contains(pred) && importantNodes.contains(i)) {
|
||||
if (importantNodes.contains(classes.find(pred)) && importantNodes.contains(classes.find(i))) {
|
||||
continue;
|
||||
}
|
||||
int newCls = classes.union(pred, i);
|
||||
|
@ -80,7 +80,7 @@ public class DataFlowGraphBuilder implements InstructionReader {
|
|||
for (int[] scc : sccs) {
|
||||
int last = -1;
|
||||
for (int node : scc) {
|
||||
if (!importantNodes.contains(node)) {
|
||||
if (!importantNodes.contains(classes.find(node))) {
|
||||
continue;
|
||||
}
|
||||
last = last < 0 ? node : classes.union(node, last);
|
||||
|
|
|
@ -605,7 +605,7 @@ function Long_toNumber(val) {
|
|||
return 0x100000000 * hi + lo;
|
||||
}
|
||||
function Long_add(a, b) {
|
||||
if (a.hi === a.lo >> 31 && b.hi === b.lo >> 31) {
|
||||
if (a.hi === (a.lo >> 31) && b.hi === (b.lo >> 31)) {
|
||||
return Long_fromNumber(a.lo + b.lo);
|
||||
}
|
||||
var a_lolo = a.lo & 0xFFFF;
|
||||
|
@ -643,7 +643,7 @@ function Long_neg(a) {
|
|||
return Long_inc(new Long(a.lo ^ 0xFFFFFFFF, a.hi ^ 0xFFFFFFFF));
|
||||
}
|
||||
function Long_sub(a, b) {
|
||||
if (a.hi === 0 && a.lo >> 31 && b.hi === b.lo >> 31) {
|
||||
if (a.hi === (a.lo >> 31) && b.hi === (b.lo >> 31)) {
|
||||
return Long_fromNumber(a.lo - b.lo);
|
||||
}
|
||||
var a_lolo = a.lo & 0xFFFF;
|
||||
|
|
Loading…
Reference in New Issue
Block a user