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

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

Issue 1196443002: Revert "cps-ir: Support foreign code." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 8f4f38ae60657333e547178dee7b0ec9eb502338..2b6b9d61d847fbe4d8c675223c73c3fae7a3ca56 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
@@ -14,13 +14,6 @@ import '../universe/universe.dart' show Selector, SelectorKind;
import 'builtin_operator.dart';
export 'builtin_operator.dart';
-// These imports are only used for the JavaScript specific nodes. If we want to
-// support more than one native backend, we should probably create better
-// abstractions for native code and its type and effect system.
-import '../js/js.dart' as js show Template;
-import '../native/native.dart' as native show NativeBehavior;
-import '../types/types.dart' as types show TypeMask;
-
abstract class Node {
/// A pointer to the parent node. Is null until set by optimization passes.
Node parent;
@@ -736,26 +729,6 @@ class CreateInvocationMirror extends Primitive {
accept(Visitor visitor) => visitor.visitCreateInvocationMirror(this);
}
-class ForeignCode extends Expression {
- final js.Template codeTemplate;
- final types.TypeMask type;
- final List<Reference<Primitive>> arguments;
- final native.NativeBehavior nativeBehavior;
- final FunctionElement dependency;
-
- /// The continuation, if the foreign code is not a JavaScript 'throw',
- /// otherwise null.
- final Reference<Continuation> continuation;
-
- ForeignCode(this.codeTemplate, this.type, List<Primitive> arguments,
- this.nativeBehavior, {Continuation continuation, this.dependency})
- : arguments = _referenceList(arguments),
- continuation = continuation == null ? null
- : new Reference<Continuation>(continuation);
-
- accept(Visitor visitor) => visitor.visitForeignCode(this);
-}
-
class Constant extends Primitive {
final ConstantExpression expression;
final values.ConstantValue value;
@@ -990,9 +963,6 @@ abstract class Visitor<T> {
// Conditions.
T visitIsTrue(IsTrue node);
-
- // Support for literal foreign code.
- T visitForeignCode(ForeignCode node);
}
/// Recursively visits the entire CPS term, and calls abstract `process*`
@@ -1278,13 +1248,6 @@ class RecursiveVisitor implements Visitor {
node.arguments.forEach(processReference);
}
- processForeignCode(ForeignCode node) {}
- visitForeignCode(ForeignCode node) {
- processForeignCode(node);
- processReference(node.continuation);
- node.arguments.forEach(processReference);
- }
-
processUnreachable(Unreachable node) {}
visitUnreachable(Unreachable node) {
processUnreachable(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