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

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

Issue 980853002: dart2dart: Bugfix in copy propagator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 5 years, 10 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 | « no previous file | pkg/compiler/lib/src/js_backend/codegen/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a09107aa1fd971c678d91fcfe511cdad0e1c8d60..150825934948c6bf2e08de0197ab074d3698f5af 100644
--- a/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
@@ -518,9 +518,9 @@ class ASTEmitter
// Try to emit a local function declaration. This is useful for functions
// that may occur in expression context, but could not be inlined anywhere.
if (stmt.variable.element is FunctionElement &&
- stmt.definition is tree.FunctionExpression &&
+ stmt.value is tree.FunctionExpression &&
!context.declaredVariables.contains(stmt.variable)) {
- tree.FunctionExpression functionExp = stmt.definition;
+ tree.FunctionExpression functionExp = stmt.value;
FunctionExpression function =
makeSubFunction(functionExp.definition, context);
FunctionDeclaration decl = new FunctionDeclaration(function);
@@ -534,7 +534,7 @@ class ASTEmitter
bool isFirstOccurrence = (context.variableNames[stmt.variable] == null);
bool isDeclaredHere = stmt.variable.host == context.currentElement;
String name = context.getVariableName(stmt.variable);
- Expression definition = visitExpression(stmt.definition, context);
+ Expression definition = visitExpression(stmt.value, context);
// Try to pull into initializer.
if (context.firstStatement == stmt && isFirstOccurrence && isDeclaredHere) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/codegen/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698