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

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

Issue 10834243: Reduce usage of .enclosingElement to get enclosing class. (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
Index: lib/compiler/implementation/ssa/optimize.dart
diff --git a/lib/compiler/implementation/ssa/optimize.dart b/lib/compiler/implementation/ssa/optimize.dart
index e84c0e907ebf24ccdc52c1f2bb6dbe09596fc028..486d522a0017eba75de513c25e1b4624f6e25e70 100644
--- a/lib/compiler/implementation/ssa/optimize.dart
+++ b/lib/compiler/implementation/ssa/optimize.dart
@@ -1191,7 +1191,7 @@ class BaseRecompilationVisitor extends HBaseVisitor {
if (other != null &&
other.isConstantNumber() &&
field.element != null &&
- field.element.enclosingElement.isClass()) {
+ field.element.isMember()) {
// Calculate the field type from the information available. If
// we have type information for the field and it contains NUMBER
// we use it as a candidate for recompilation.

Powered by Google App Engine
This is Rietveld 408576698