mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Bugfixes
This commit is contained in:
parent
824cc79901
commit
80814ef167
|
@ -752,7 +752,7 @@ public class AstIO {
|
|||
}
|
||||
case 9: {
|
||||
ConstantExpr expr = new ConstantExpr();
|
||||
expr.setValue(symbolTable.at(input.readInt()));
|
||||
expr.setValue(ValueType.parse(symbolTable.at(input.readInt())));
|
||||
return expr;
|
||||
}
|
||||
case 10: {
|
||||
|
|
|
@ -62,8 +62,11 @@ public class DataFlowGraphBuilder implements InstructionReader {
|
|||
}
|
||||
IntegerArray startNodes = new IntegerArray(graph.size());
|
||||
for (int i = paramCount; i < graph.size(); ++i) {
|
||||
if (!importantNodes.contains(i) && graph.incomingEdgesCount(i) == 1) {
|
||||
classes.union(graph.incomingEdges(i)[0], i);
|
||||
if (importantNodes.contains(i)) {
|
||||
continue;
|
||||
}
|
||||
for (int pred : graph.incomingEdges(i)) {
|
||||
classes.union(pred, i);
|
||||
}
|
||||
if (graph.incomingEdgesCount(i) == 0) {
|
||||
startNodes.add(i);
|
||||
|
@ -72,9 +75,12 @@ public class DataFlowGraphBuilder implements InstructionReader {
|
|||
|
||||
int[][] sccs = GraphUtils.findStronglyConnectedComponents(graph, startNodes.getAll());
|
||||
for (int[] scc : sccs) {
|
||||
int first = scc[0];
|
||||
for (int i = 1; i < scc.length; ++i) {
|
||||
classes.union(first, scc[i]);
|
||||
int last = -1;
|
||||
for (int node : scc) {
|
||||
if (!importantNodes.contains(node)) {
|
||||
continue;
|
||||
}
|
||||
last = last < 0 ? node : classes.union(node, last);
|
||||
}
|
||||
}
|
||||
return classes.pack(program.variableCount());
|
||||
|
|
|
@ -53,7 +53,7 @@ public class Linker {
|
|||
for (Instruction insn : block.getInstructions()) {
|
||||
if (insn instanceof InvokeInstruction) {
|
||||
InvokeInstruction invoke = (InvokeInstruction)insn;
|
||||
MethodDependencyInfo linkedMethod = dependency.getMethod(invoke.getMethod());
|
||||
MethodDependencyInfo linkedMethod = dependency.getMethodImplementation(invoke.getMethod());
|
||||
if (linkedMethod != null) {
|
||||
invoke.setMethod(linkedMethod.getReference());
|
||||
}
|
||||
|
|
|
@ -491,7 +491,7 @@ function $rt_s(index) {
|
|||
}
|
||||
var $rt_continueCounter = 0;
|
||||
function $rt_continue(f) {
|
||||
if ($rt_continueCounter++ == 40) {
|
||||
if ($rt_continueCounter++ == 5) {
|
||||
$rt_continueCounter = 0;
|
||||
return function() {
|
||||
var self = this;
|
||||
|
|
Loading…
Reference in New Issue
Block a user