]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EIf.java
SCL compiler generates line numbers to bytecode
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / EIf.java
index fe6216fe153c3bb8fec3da0e83c86940aa8a9269..149c52f500235d5f732aa4a12f744b3d75851bc7 100644 (file)
@@ -47,16 +47,16 @@ public class EIf extends Expression {
         CodeWriter thenBlock = w.createBlock();
         if(else_ != null) {
             CodeWriter elseBlock = w.createBlock();        
-            w.if_(conditionVal, thenBlock.getContinuation(), elseBlock.getContinuation());
+            w.if_(location, conditionVal, thenBlock.getContinuation(), elseBlock.getContinuation());
                 
             IVal elseVal = else_.toVal(context, elseBlock);
-            elseBlock.jump(joinPoint.getContinuation(), elseVal);
+            elseBlock.jump(location, joinPoint.getContinuation(), elseVal);
         }
         else {
-            w.if_(conditionVal, thenBlock.getContinuation(), joinPoint.getContinuation());
+            w.if_(location, conditionVal, thenBlock.getContinuation(), joinPoint.getContinuation());
         }
         IVal thenVal = then_.toVal(context, thenBlock);
-        thenBlock.jump(joinPoint.getContinuation(), thenVal);
+        thenBlock.jump(location, joinPoint.getContinuation(), thenVal);
         w.continueAs(joinPoint);
         
         return w.getParameters()[0];