X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Finternal%2Fcodegen%2Fssa%2FSSAFunction.java;h=b2db131a41f50d6f55765d300ebd6d7cf42e30d1;hp=0a608a3d342adf6a9253fd400892475ce6b45131;hb=91682baa9a8252390f09b80fd724f47e5957b234;hpb=3826e289058a51d09310b7ba1251e959dc0ed3d0 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/SSAFunction.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/SSAFunction.java index 0a608a3d3..b2db131a4 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/SSAFunction.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/SSAFunction.java @@ -279,7 +279,7 @@ public final class SSAFunction extends SSAClosure { for(SSABlock block = f.firstBlock; block != null; block = block.next) block.parent = this; lastBlock.next = f.firstBlock; - f.firstBlock.prev = lastBlock; + f.firstBlock.prev = lastBlock; lastBlock = f.lastBlock; firstBlock.firstStatement = firstBlock.lastStatement = null; @@ -287,7 +287,7 @@ public final class SSAFunction extends SSAClosure { effect = f.effect; BoundVar[] newParameters = BoundVar.copy(f.firstBlock.parameters); firstBlock.setParameters(BoundVar.concat(getParameters(), newParameters)); - firstBlock.setExit(new Jump(f.firstBlock.createOccurrence(), ValRef.createOccurrences(newParameters))); + firstBlock.setExit(new Jump(-1, f.firstBlock.createOccurrence(), ValRef.createOccurrences(newParameters))); context.markModified("SSAFunction.simplify-simple-lambda"); } @@ -409,7 +409,7 @@ public final class SSAFunction extends SSAClosure { parameter.parent = firstBlock; } - public void apply(ValRef[] parameters) { + public void apply(int lineNumber, ValRef[] parameters) { if(parameters.length == 0) return; if(firstBlock.hasNoOccurences()) { @@ -421,7 +421,7 @@ public final class SSAFunction extends SSAClosure { else { BoundVar[] newVars = new BoundVar[getArity()-parameters.length]; SSABlock block = new SSABlock(newVars); - block.setExit(new Jump(firstBlock.createOccurrence(), + block.setExit(new Jump(lineNumber, firstBlock.createOccurrence(), ValRef.concat(ValRef.copy(parameters), ValRef.createOccurrences(newVars)))); addBlockInFront(block); }