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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/task.dart

Issue 808553004: Revert "cps-ir: Add support for intercepted calls." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/js_backend/codegen/task.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/task.dart b/pkg/compiler/lib/src/js_backend/codegen/task.dart
index e6991622455ecd64726664f6e2801dbe02f118cb..8fc5804447fff39ea8186b5f55bbc199c549af3b 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -16,8 +16,7 @@ import '../../cps_ir/cps_ir_nodes.dart' as cps;
import '../../cps_ir/cps_ir_builder.dart';
import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
import '../../tree/tree.dart' as ast;
-import '../../types/types.dart' show TypeMask, UnionTypeMask, FlatTypeMask,
- ForwardingTypeMask;
+import '../../types/types.dart' show TypeMask;
import '../../scanner/scannerlib.dart' as scanner;
import '../../elements/elements.dart';
import '../../closure.dart';
@@ -109,27 +108,12 @@ class CspFunctionCompiler implements FunctionCompiler {
if (cpsNode == null) {
giveUp('unable to build cps definition of $element');
}
- new UnsugarVisitor(glue).rewrite(cpsNode);
+ const UnsugarVisitor().rewrite(cpsNode);
return cpsNode;
}
static const Pattern PRINT_TYPED_IR_FILTER = null;
- String formatTypeMask(TypeMask type) {
- if (type is UnionTypeMask) {
- return '[${type.disjointMasks.map(formatTypeMask).join(', ')}]';
- } else if (type is FlatTypeMask) {
- if (type.isEmpty) {
- return "null";
- }
- String suffix = (type.isExact ? "" : "+") + (type.isNullable ? "?" : "!");
- return '${type.base.name}$suffix';
- } else if (type is ForwardingTypeMask) {
- return formatTypeMask(type.forwardTo);
- }
- throw 'unsupported: $type';
- }
-
cps.FunctionDefinition optimizeCpsIR(cps.FunctionDefinition cpsNode) {
// Transformations on the CPS IR.
traceGraph("IR Builder", cpsNode);
@@ -143,7 +127,7 @@ class CspFunctionCompiler implements FunctionCompiler {
PRINT_TYPED_IR_FILTER.matchAsPrefix(cpsNode.element.name) != null) {
String printType(cps.Node node, String s) {
var type = typePropagator.getType(node);
- return type == null ? s : "$s:${formatTypeMask(type.type)}";
+ return type == null ? s : "<$type: $s>";
}
DEBUG_MODE = true;
print(new SExpressionStringifier(printType).visit(cpsNode));
@@ -162,7 +146,7 @@ class CspFunctionCompiler implements FunctionCompiler {
}
tree_ir.FunctionDefinition compileToTreeIR(cps.FunctionDefinition cpsNode) {
- tree_builder.Builder builder = new tree_builder.Builder(glue, compiler);
+ tree_builder.Builder builder = new tree_builder.Builder(compiler);
tree_ir.FunctionDefinition treeNode = builder.buildFunction(cpsNode);
assert(treeNode != null);
traceGraph('Tree builder', treeNode);
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/glue.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/unsugar.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698