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

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

Issue 1345983007: dart2js CPS: Clean up the S-Expression builder. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16093d3e59fba4c74dbcc207c1f4e0d7c049828f..8307e05130e16872376e2e013cca28e191e946f1 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -126,7 +126,7 @@ class CpsFunctionCompiler implements FunctionCompiler {
return cpsNode;
}
- static const Pattern PRINT_TYPED_IR_FILTER = null;
+ static const Pattern PRINT_TYPED_IR_FILTER = '';
Kevin Millikin (Google) 2015/09/18 09:00:58 I won't commit this change.
String formatTypeMask(TypeMask type) {
if (type is UnionTypeMask) {
@@ -151,8 +151,9 @@ class CpsFunctionCompiler implements FunctionCompiler {
cps.Node node = nodeOrRef is cps.Reference
? nodeOrRef.definition
: nodeOrRef;
- var type = typePropagator.getType(node);
- return type == null ? s : "$s:${formatTypeMask(type.type)}";
+ return node is cps.Variable && node.type != null
+ ? '$s:${formatTypeMask(node.type)}'
+ : s;
}
DEBUG_MODE = true;
print(new SExpressionStringifier(printType).visit(cpsNode));
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698