]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ELet.java
SCL compiler generates line numbers to bytecode
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / ELet.java
index 71195352405ecf2c2ce35ba5010bd5e814982162..811877aa0b618c6052933cfece5f05163ddff3d9 100644 (file)
@@ -36,14 +36,6 @@ public class ELet extends Expression {
         this.in = in;
     }
     
-    @Override
-    public void collectVars(TObjectIntHashMap<Variable> allVars,
-            TIntHashSet vars) {
-        for(Assignment assign : assignments)
-            assign.value.collectVars(allVars, vars);
-        in.collectVars(allVars, vars);
-    }
-    
     @Override
     protected void updateType() throws MatchException {
         setType(in.getType());
@@ -162,7 +154,7 @@ public class ELet extends Expression {
             IVal[] parameters = newW.getParameters();
             for(int j=0;j<parameters.length;++j)
                 decomposed.parameters[j].setVal(parameters[j]);
-            newW.return_(decomposed.body.toVal(context, newW));
+            newW.return_(assignments[i].value.location, decomposed.body.toVal(context, newW));
         }
         return in.toVal(context, w);
     }