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

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

Issue 2933363003: Add ClosureRepresentationInfo, the new public face of ClosureClassMap (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/kernel_backend_strategy.dart
diff --git a/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart b/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart
index c5ef1b1d31a79a39f81082353ad68e4b7edb0cef..e8212576331bdd7e285783c0131b74374553c6cc 100644
--- a/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart
@@ -313,20 +313,6 @@ class KLocal implements Local {
class KernelClosureClassMaps implements ClosureClassMaps<ir.Node> {
const KernelClosureClassMaps();
- @override
- ClosureClassMap getLocalFunctionMap(Local localFunction) {
- return new ClosureClassMap(null, null, null, null);
- }
-
- @override
- ClosureClassMap getMemberMap(MemberEntity member) {
- ThisLocal thisLocal;
- if (member.isInstanceMember) {
- thisLocal = new ThisLocal(member);
- }
- return new ClosureClassMap(null, null, null, thisLocal);
- }
-
@override
ClosureAnalysisInfo getClosureAnalysisInfo(ir.Node node) {
return const ClosureAnalysisInfo();
@@ -337,6 +323,18 @@ class KernelClosureClassMaps implements ClosureClassMaps<ir.Node> {
ir.Node loopNode) {
return const LoopClosureRepresentationInfo();
}
+
+ @override
+ ClosureRepresentationInfo getClosureRepresentationInfo(Entity entity) {
+ if (entity is MemberEntity) {
+ ThisLocal thisLocal;
+ if (entity.isInstanceMember) {
+ thisLocal = new ThisLocal(entity);
+ }
+ return new ClosureClassMap(null, null, null, thisLocal);
+ }
+ return const ClosureRepresentationInfo();
+ }
}
class KernelSorter implements Sorter {

Powered by Google App Engine
This is Rietveld 408576698