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%2Fexits%2FThrow.java;h=0193c99c2368fd8a690607438646f76e4bdad1ce;hp=593b81c63f2914c40355e47b7932336f3e0ced29;hb=refs%2Fchanges%2F34%2F1534%2F3;hpb=3826e289058a51d09310b7ba1251e959dc0ed3d0 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/exits/Throw.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/exits/Throw.java index 593b81c63..0193c99c2 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/exits/Throw.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/ssa/exits/Throw.java @@ -30,7 +30,8 @@ public class Throw extends SSAExit { TypeDesc exceptionClass; String description; - public Throw(TypeDesc exceptionClass, String description) { + public Throw(int lineNumber, TypeDesc exceptionClass, String description) { + super(lineNumber); this.exceptionClass = exceptionClass; this.description = description; } @@ -43,8 +44,7 @@ public class Throw extends SSAExit { @Override public void generateCode(MethodBuilder mb) { - //mb.push(exception.getBinding()); - //cb.mapLineNumber(location); + mb.lineNumber(lineNumber); mb.newObject(exceptionClass); mb.dup(); if(description == null) @@ -67,7 +67,7 @@ public class Throw extends SSAExit { @Override public SSAExit copy(CopyContext context) { - return new Throw(exceptionClass, description); + return new Throw(lineNumber, exceptionClass, description); } @Override