]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/chr/CHRRuleset.java
SCL compiler generates line numbers to bytecode
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / chr / CHRRuleset.java
index 55bbcfe34f9c245968083ab39e374b9814fc8908..aa59d4c0239159b604d396be91710fb66d69cfda 100644 (file)
@@ -257,7 +257,7 @@ public class CHRRuleset extends Symbol {
                 PlanRealizer realizer = new PlanRealizer(cachedContext, this, runtimeRulesetVariable, implementationParameters[0], plan.ops);
                 realizer.nextOp(methodWriter);
                 if(methodWriter.isUnfinished())
-                    methodWriter.return_(BooleanConstant.TRUE);
+                    methodWriter.return_(rule.location, BooleanConstant.TRUE);
             }
         }
         if(!includes.isEmpty() || extensible) {
@@ -273,7 +273,7 @@ public class CHRRuleset extends Symbol {
                        methodWriter.apply(Locations.NO_LOCATION,
                                new JavaMethod(true, runtimeRulesetClassName, "register", Types.PROC, Types.UNIT, new Type[] {runtimeRulesetType, Types.CHRContext}),
                                object.getTarget(), methodWriter.getParameters()[0]);
-                methodWriter.return_(NoRepConstant.UNIT);
+                methodWriter.return_(location, NoRepConstant.UNIT);
             }
             {
                 CodeWriter methodWriter = object.createMethod(w.getModuleWriter(), TVar.EMPTY_ARRAY, Types.PROC, Types.UNIT, new Type[] {Types.CHRContext});
@@ -287,7 +287,7 @@ public class CHRRuleset extends Symbol {
                        methodWriter.apply(Locations.NO_LOCATION,
                                new JavaMethod(true, runtimeRulesetClassName, "unregister", Types.PROC, Types.UNIT, new Type[] {runtimeRulesetType, Types.CHRContext}),
                                object.getTarget(), methodWriter.getParameters()[0]);
-                methodWriter.return_(NoRepConstant.UNIT);
+                methodWriter.return_(location, NoRepConstant.UNIT);
             }
         }
         if(initConstraint != null) {