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

Unified Diff: lib/compiler/implementation/ssa/optimize.dart

Issue 10830331: Fix wrong optimization for private fields (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | tests/language/private1.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/optimize.dart
diff --git a/lib/compiler/implementation/ssa/optimize.dart b/lib/compiler/implementation/ssa/optimize.dart
index 4faa8e9e2e4ae016ee5352b71ae07b34f8c7f2fd..91e881584ac40dbaa05f56512b838fa3107795b7 100644
--- a/lib/compiler/implementation/ssa/optimize.dart
+++ b/lib/compiler/implementation/ssa/optimize.dart
@@ -563,6 +563,7 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
if (type === null) return node;
Element field = compiler.world.locateSingleField(type, node.name);
if (field === null) return node;
+ if (field.getLibrary() !== work.element.getLibrary()) return node;
floitsch 2012/08/15 11:59:42 why not looking if the field is private? There sho
Søren Gjesse 2012/08/15 12:50:04 It works if the check is just !node.name.isPrivate
floitsch 2012/08/15 12:56:34 That's what I meant.
Modifiers modifiers = field.modifiers;
bool isFinalOrConst = false;
if (modifiers != null) {
« no previous file with comments | « no previous file | tests/language/private1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698