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

Unified Diff: pkg/compiler/lib/src/js_model/js_strategy.dart

Issue 2969993002: Handle instance/super methods in js_model/model_test (Closed)
Patch Set: Created 3 years, 5 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/js_model/js_strategy.dart
diff --git a/pkg/compiler/lib/src/js_model/js_strategy.dart b/pkg/compiler/lib/src/js_model/js_strategy.dart
index 8203349414e19eacc2c629dd9aedfd34e2536606..972fda507438b14b898529b6230ff240579b07f3 100644
--- a/pkg/compiler/lib/src/js_model/js_strategy.dart
+++ b/pkg/compiler/lib/src/js_model/js_strategy.dart
@@ -52,7 +52,8 @@ class JsBackendStrategy implements KernelBackendStrategy {
GlobalLocalsMap get globalLocalsMapForTesting => _globalLocalsMap;
@override
- ClosedWorldRefiner createClosedWorldRefiner(ClosedWorld closedWorld) {
+ ClosedWorldRefiner createClosedWorldRefiner(
+ covariant ClosedWorldBase closedWorld) {
KernelFrontEndStrategy strategy = _compiler.frontendStrategy;
KernelToElementMapForImpact elementMap = strategy.elementMap;
_elementMap = new JsKernelToElementMap(
@@ -112,6 +113,16 @@ class JsBackendStrategy implements KernelBackendStrategy {
convertClassSet(closedWorld.getClassSet(cls));
}, ClassHierarchyNode.ALL);
+ List<MemberEntity> liveInstanceMembers =
+ closedWorld.liveInstanceMembers.map(_map.toBackendMember).toList();
+
+ Map<ClassEntity, Set<ClassEntity>> mixinUses =
+ <ClassEntity, Set<ClassEntity>>{};
+ closedWorld.mixinUses.forEach((ClassEntity cls, Set<ClassEntity> uses) {
+ mixinUses[_map.toBackendClass(cls)] =
+ uses.map(_map.toBackendClass).toSet();
+ });
+
return new JsClosedWorld(
elementEnvironment: _elementEnvironment,
dartTypes: _elementMap.types,
@@ -123,11 +134,11 @@ class JsBackendStrategy implements KernelBackendStrategy {
classHierarchyNodes: classHierarchyNodes,
classSets: classSets,
implementedClasses: implementedClasses,
+ liveInstanceMembers: liveInstanceMembers,
// TODO(johnniwinther): Support these.
allTypedefs: new ImmutableEmptySet<TypedefElement>(),
resolutionWorldBuilder: null,
- functionSet: null,
- mixinUses: null,
+ mixinUses: mixinUses,
Siggi Cherem (dart-lang) 2017/07/05 20:28:52 is there more to this than what you have above?
Johnni Winther 2017/07/06 14:14:46 No. Moved
typesImplementedBySubclasses: null);
}

Powered by Google App Engine
This is Rietveld 408576698