| 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..c0cdc93366aeb18232605026dab9355a1772dcc8 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
|
| @@ -1917,7 +1917,7 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
|
| use(node.inputs[0]);
|
| pushStatement(new js.Throw(pop()), node);
|
| } else {
|
| - generateThrowWithHelper(r'$throw', node.inputs[0]);
|
| + generateThrowWithHelper('wrapException', node.inputs[0]);
|
| }
|
| }
|
|
|
| @@ -1995,6 +1995,20 @@ 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);
|
| +
|
| + 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].
|
| }
|
|
|