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%2Felaboration%2Fchr%2Fplan%2FIterateConstraintOp.java;h=ddaaebd68d3906313e3e12b81f3d2012f52a771a;hp=035ccd624a134f8942e3d19a8908fca2ddda75a5;hb=91682baa9a8252390f09b80fd724f47e5957b234;hpb=3826e289058a51d09310b7ba1251e959dc0ed3d0 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/plan/IterateConstraintOp.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/plan/IterateConstraintOp.java index 035ccd624..ddaaebd68 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/plan/IterateConstraintOp.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/plan/IterateConstraintOp.java @@ -59,19 +59,19 @@ public class IterateConstraintOp extends PlanOp { for(int i=0;i>i)&1)==1) parameters.add(expressions[i].toVal(context, w)); - w.jump(bodyContinuation, w.apply(location, + w.jump(location, bodyContinuation, w.apply(location, constraint.fetchFromIndex(context, boundMask), parameters.toArray(new IVal[parameters.size()]))); - body.branchAwayIf(body.apply(location, NullCheck.INSTANCE.createSpecialization(constraint.factType), fact), + body.branchAwayIf(location, body.apply(location, NullCheck.INSTANCE.createSpecialization(constraint.factType), fact), end.getContinuation()); IVal id = body.apply(location, constraint.accessId, fact); for(PartnerFact partnerFact : planContext.partnerFacts) if(partnerFact.active && !passive) { - body.branchAwayUnless(body.apply(location, JavaComparisonOperation.ILESS, id, partnerFact.id), + body.branchAwayUnless(location, body.apply(location, JavaComparisonOperation.ILESS, id, partnerFact.id), nextFact.getContinuation()); } else if(partnerFact.constraint == constraint) { - body.branchAwayIf(body.apply(location, JavaComparisonOperation.IEQUAL, id, partnerFact.id), + body.branchAwayIf(location, body.apply(location, JavaComparisonOperation.IEQUAL, id, partnerFact.id), nextFact.getContinuation()); } @@ -82,8 +82,8 @@ public class IterateConstraintOp extends PlanOp { planContext.partnerFacts.add(new PartnerFact(false, id, constraint, fact, constraint.mayBeRemoved(), killAfterMatch, nextElement, bodyContinuation, end.getContinuation())); planContext.nextOp(body); if(body.isUnfinished()) - body.jump(nextFact.getContinuation()); - nextFact.jump(bodyContinuation, nextFact.apply(location, nextElement, fact)); + body.jump(location, nextFact.getContinuation()); + nextFact.jump(location, bodyContinuation, nextFact.apply(location, nextElement, fact)); w.continueAs(end); }