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

Unified Diff: lib/compiler/implementation/compile_time_constants.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/compile_time_constants.dart
diff --git a/lib/compiler/implementation/compile_time_constants.dart b/lib/compiler/implementation/compile_time_constants.dart
index 420ff059152de063042d9edcaa54d96d36c5deb1..87792a842b6d10d6b339d87c06449debb8d094db 100644
--- a/lib/compiler/implementation/compile_time_constants.dart
+++ b/lib/compiler/implementation/compile_time_constants.dart
@@ -987,11 +987,11 @@ class CompileTimeConstantEvaluator extends AbstractVisitor {
Send send = node.send;
FunctionElement constructor = elements[send];
- ClassElement classElement = constructor.enclosingElement;
+ ClassElement classElement = constructor.getEnclosingClass();
if (classElement.isInterface()) {
compiler.resolver.resolveMethodElement(constructor);
constructor = constructor.defaultImplementation;
- classElement = constructor.enclosingElement;
+ classElement = constructor.getEnclosingClass();
}
Selector selector = elements.getSelector(send);
@@ -1126,7 +1126,7 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
if (!foundSuperOrRedirect) {
// No super initializer found. Try to find the default constructor if
// the class is not Object.
- ClassElement enclosingClass = constructor.enclosingElement;
+ ClassElement enclosingClass = constructor.getEnclosingClass();
ClassElement superClass = enclosingClass.superclass;
if (enclosingClass != compiler.objectClass) {
assert(superClass !== null);
« no previous file with comments | « no previous file | lib/compiler/implementation/compiler.dart » ('j') | lib/compiler/implementation/elements/elements.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698