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

Unified Diff: pkg/compiler/lib/src/js_backend/backend_helpers.dart

Issue 2653203002: Use entities in CommonElements interface. (Closed)
Patch Set: Created 3 years, 11 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 | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/backend_impact.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/backend_helpers.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend_helpers.dart b/pkg/compiler/lib/src/js_backend/backend_helpers.dart
index 330bd378ee4f5902c063b1b7b9f8bc7d4a047f55..5c2834ac1874d7fc6d1cceafac82c64bbfda075e 100644
--- a/pkg/compiler/lib/src/js_backend/backend_helpers.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_helpers.dart
@@ -217,8 +217,10 @@ class BackendHelpers {
return element;
}
- Element findCoreHelper(String name) =>
- compiler.commonElements.coreLibrary.implementation.localLookup(name);
+ Element findCoreHelper(String name) {
+ LibraryElement coreLibrary = compiler.commonElements.coreLibrary;
+ return coreLibrary.implementation.localLookup(name);
+ }
ConstructorElement _findConstructor(ClassElement cls, String name) {
cls.ensureResolved(resolution);
@@ -356,7 +358,8 @@ class BackendHelpers {
// [LinkedHashMap] is reexported from dart:collection and can therefore not
// be loaded from dart:core in [onLibraryScanned].
- mapLiteralClass = compiler.commonElements.coreLibrary.find('LinkedHashMap');
+ LibraryElement coreLibrary = compiler.commonElements.coreLibrary;
+ mapLiteralClass = coreLibrary.find('LinkedHashMap');
assert(invariant(
compiler.commonElements.coreLibrary, mapLiteralClass != null,
message: "Element 'LinkedHashMap' not found in 'dart:core'."));
@@ -395,7 +398,8 @@ class BackendHelpers {
jsStringOperatorAdd = compiler.lookupElementIn(jsStringClass, '+');
jsStringToString = compiler.lookupElementIn(jsStringClass, 'toString');
- objectEquals = compiler.lookupElementIn(commonElements.objectClass, '==');
+ ClassElement objectClass = commonElements.objectClass;
+ objectEquals = compiler.lookupElementIn(objectClass, '==');
}
ConstructorElement _mapLiteralConstructor;
@@ -847,8 +851,9 @@ class BackendHelpers {
MethodElement get objectNoSuchMethod {
if (_objectNoSuchMethod == null) {
- _objectNoSuchMethod = commonElements.objectClass
- .lookupLocalMember(Identifiers.noSuchMethod_);
+ ClassElement objectClass = commonElements.objectClass;
+ _objectNoSuchMethod =
+ objectClass.lookupLocalMember(Identifiers.noSuchMethod_);
}
return _objectNoSuchMethod;
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/backend_impact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698