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

Unified Diff: pkg/compiler/lib/src/kernel/element_map_impl.dart

Issue 2935063002: Add ClosedWorld.elementEnvironment and remove Compiler.elementEnvironment (Closed)
Patch Set: Created 3 years, 6 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: pkg/compiler/lib/src/kernel/element_map_impl.dart
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index 259fe5ea36b5c8943bc70969a018fce2a8c4de7b..70a6fc039d5211a67dc6ba4457008dd193995a4c 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -1500,7 +1500,6 @@ class KernelResolutionWorldBuilder extends KernelResolutionWorldBuilderBase {
class KernelClosedWorld extends ClosedWorldBase {
final KernelToElementMapImpl _elementMap;
- final ElementEnvironment _elementEnvironment;
KernelClosedWorld(this._elementMap,
{ElementEnvironment elementEnvironment,
@@ -1517,8 +1516,8 @@ class KernelClosedWorld extends ClosedWorldBase {
Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses,
Map<ClassEntity, ClassHierarchyNode> classHierarchyNodes,
Map<ClassEntity, ClassSet> classSets})
- : this._elementEnvironment = elementEnvironment,
- super(
+ : super(
+ elementEnvironment: elementEnvironment,
commonElements: commonElements,
constantSystem: constantSystem,
nativeData: nativeData,
@@ -1587,14 +1586,14 @@ class KernelClosedWorld extends ClosedWorldBase {
@override
bool hasElementIn(ClassEntity cls, Selector selector, Entity element) {
while (cls != null) {
- MemberEntity member = _elementEnvironment
+ MemberEntity member = elementEnvironment
.lookupClassMember(cls, selector.name, setter: selector.isSetter);
if (member != null &&
(!selector.memberName.isPrivate ||
member.library == selector.library)) {
return member == element;
}
- cls = _elementEnvironment.getSuperClass(cls);
+ cls = elementEnvironment.getSuperClass(cls);
}
return false;
}
« no previous file with comments | « pkg/compiler/lib/src/js_model/js_strategy.dart ('k') | pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698