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

Unified Diff: pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart

Issue 1007103003: cps-ir: Merge variables based on set-based liveness and graph coloring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Missed a few comments Created 5 years, 9 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/dart_backend/backend_ast_emitter.dart
diff --git a/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart b/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
index 150825934948c6bf2e08de0197ab074d3698f5af..06f9392e2710d565c6b1819aafa0b31931a9297a 100644
--- a/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
@@ -519,7 +519,8 @@ class ASTEmitter
// that may occur in expression context, but could not be inlined anywhere.
if (stmt.variable.element is FunctionElement &&
stmt.value is tree.FunctionExpression &&
- !context.declaredVariables.contains(stmt.variable)) {
+ !context.declaredVariables.contains(stmt.variable) &&
+ stmt.variable.writeCount == 1) {
tree.FunctionExpression functionExp = stmt.value;
FunctionExpression function =
makeSubFunction(functionExp.definition, context);

Powered by Google App Engine
This is Rietveld 408576698