Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
| index 42f055a7eda9f9a03265b893735585b4d292ce2d..aad5148e5584aeb7fa0582f10f78900b1d9d8161 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
| @@ -1995,6 +1995,26 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| pushStatement(new js.Throw(value)); |
| } |
| + visitThrowExpression(HThrowExpression node) { |
| + HInstruction argument = node.inputs[0]; |
| + use(argument); |
| + |
| + Element helper = compiler.findHelper(new SourceString("throwExpression")); |
| + world.registerStaticUse(helper); |
| + |
| + // The helper uses the non-throwing helper, so we have to register that |
| + // both are used. |
| + Element nonThrowingHelper = |
| + compiler.findHelper(new SourceString(r"$throw")); |
| + world.registerStaticUse(nonThrowingHelper); |
|
ngeoffray
2013/04/10 12:06:39
the compilation of throwExpression will figure tha
erikcorry
2013/04/10 12:52:32
Done.
|
| + |
| + js.VariableUse jsHelper = |
| + new js.VariableUse(backend.namer.isolateAccess(helper)); |
| + js.Call value = new js.Call(jsHelper, [pop()]); |
| + attachLocation(value, argument); |
| + push(value, node); |
| + } |
| + |
| void visitSwitch(HSwitch node) { |
| // Switches are handled using [visitSwitchInfo]. |
| } |