This commit is contained in:
konsoletyper 2015-03-09 22:10:26 +03:00
parent 824cc79901
commit 80814ef167
4 changed files with 14 additions and 8 deletions

View File

@ -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: {

View File

@ -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());

View File

@ -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());
}

View File

@ -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;