| Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
|
| index 2ce1b018eab365cc9eab62736f1ebaae2c6f8796..9fad37c5bbe4e12dd4ad6ad4f451ad81b083878c 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
|
| @@ -2422,7 +2422,6 @@ class JsIrBuilderVisitor extends IrBuilderVisitor {
|
| default:
|
| compiler.internalError(element, "Unexpected element type $element");
|
| }
|
| - new CleanupPass().visit(root);
|
| return root;
|
| });
|
| }
|
| @@ -3357,49 +3356,3 @@ class JsIrBuilderVisitor extends IrBuilderVisitor {
|
| }
|
| }
|
| }
|
| -
|
| -/// Perform simple post-processing on the initial CPS-translated root term.
|
| -///
|
| -/// This pass performs backend-independent post-processing on the translated
|
| -/// term. It is implemented separately from the optimization passes because
|
| -/// it is required for correctness of the implementation.
|
| -///
|
| -/// It performs the following translations:
|
| -/// - Replace [ir.LetPrim] binding a [ir.NonTailThrow] with a [ir.Throw]
|
| -/// expression.
|
| -class CleanupPass extends ir.RecursiveVisitor {
|
| - ir.Expression replacementFor(ir.Expression expression) {
|
| - if (expression != null && expression is ir.LetPrim) {
|
| - ir.Primitive primitive = expression.primitive;
|
| - if (primitive is ir.NonTailThrow) {
|
| - ir.RemovalVisitor.remove(expression);
|
| - return new ir.Throw(primitive.value.definition);
|
| - }
|
| - }
|
| - return expression;
|
| - }
|
| -
|
| - processFunctionDefinition(ir.FunctionDefinition node) {
|
| - node.body = replacementFor(node.body);
|
| - }
|
| -
|
| - processLetPrim(ir.LetPrim node) {
|
| - node.body = replacementFor(node.body);
|
| - }
|
| -
|
| - processLetCont(ir.LetCont node) {
|
| - node.body = replacementFor(node.body);
|
| - }
|
| -
|
| - processLetHandler(ir.LetHandler node) {
|
| - node.body = replacementFor(node.body);
|
| - }
|
| -
|
| - processLetMutable(ir.LetMutable node) {
|
| - node.body = replacementFor(node.body);
|
| - }
|
| -
|
| - processContinuation(ir.Continuation node) {
|
| - node.body = replacementFor(node.body);
|
| - }
|
| -}
|
|
|