Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(780)

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart

Issue 1243063002: dart2js cps: Remove NonTailThrow. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
index 98d9a351850c5905e2b20a4dff7f45f4563eb9c1..c323b01378114e6e4c186d5621c45f86dba8872b 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
@@ -533,23 +533,6 @@ class Rethrow extends TailExpression {
accept(Visitor visitor) => visitor.visitRethrow(this);
}
-/// A throw occurring in non-tail position.
-///
-/// The CPS translation of an expression produces a primitive as the value
-/// of the expression. For convenience in the implementation of the
-/// translation, a [NonTailThrow] is used as that value. A cleanup pass
-/// removes these and replaces them with [Throw] expressions.
-class NonTailThrow extends Primitive {
- final Reference<Primitive> value;
-
- NonTailThrow(Primitive value) : value = new Reference<Primitive>(value);
-
- accept(Visitor visitor) => visitor.visitNonTailThrow(this);
-
- bool get isSafeForElimination => false;
- bool get isSafeForReordering => false;
-}
-
/// An expression that is known to be unreachable.
///
/// This can be placed as the body of a call continuation, when the caller is
@@ -1137,7 +1120,6 @@ abstract class Visitor<T> {
T visitParameter(Parameter node);
T visitContinuation(Continuation node);
T visitMutableVariable(MutableVariable node);
- T visitNonTailThrow(NonTailThrow node);
T visitGetStatic(GetStatic node);
T visitInterceptor(Interceptor node);
T visitCreateInstance(CreateInstance node);
@@ -1408,12 +1390,6 @@ class RecursiveVisitor implements Visitor {
node.arguments.forEach(processReference);
}
- processNonTailThrow(NonTailThrow node) {}
- visitNonTailThrow(NonTailThrow node) {
- processNonTailThrow(node);
- processReference(node.value);
- }
-
processCreateInvocationMirror(CreateInvocationMirror node) {}
visitCreateInvocationMirror(CreateInvocationMirror node) {
processCreateInvocationMirror(node);
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698