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

Side by Side Diff: pkg/compiler/lib/src/kernel/closure.dart

Issue 2949293002: Add ScopeInfo class for variable information that doesn't actually involve closures. (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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../common/tasks.dart'; 8 import '../common/tasks.dart';
9 import '../elements/entities.dart'; 9 import '../elements/entities.dart';
10 import '../world.dart'; 10 import '../world.dart';
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 ClosedWorldRefiner closedWorldRefiner) { 90 ClosedWorldRefiner closedWorldRefiner) {
91 // TODO(efortuna): implement. 91 // TODO(efortuna): implement.
92 } 92 }
93 93
94 /// TODO(johnniwinther,efortuna): Implement this. 94 /// TODO(johnniwinther,efortuna): Implement this.
95 @override 95 @override
96 ClosureAnalysisInfo getClosureAnalysisInfo(ir.Node node) { 96 ClosureAnalysisInfo getClosureAnalysisInfo(ir.Node node) {
97 return const ClosureAnalysisInfo(); 97 return const ClosureAnalysisInfo();
98 } 98 }
99 99
100 @override
101 ScopeInfo getScopeInfo(Entity entity) {
102 // TODO(efortuna): Specialize this function from the one below.
103 return getClosureRepresentationInfo(entity);
104 }
105
100 /// TODO(johnniwinther,efortuna): Implement this. 106 /// TODO(johnniwinther,efortuna): Implement this.
101 @override 107 @override
102 LoopClosureRepresentationInfo getClosureRepresentationInfoForLoop( 108 LoopClosureRepresentationInfo getClosureRepresentationInfoForLoop(
103 ir.Node loopNode) { 109 ir.Node loopNode) {
104 return const LoopClosureRepresentationInfo(); 110 return const LoopClosureRepresentationInfo();
105 } 111 }
106 112
107 @override 113 @override
108 ClosureRepresentationInfo getClosureRepresentationInfo(Entity entity) { 114 ClosureRepresentationInfo getClosureRepresentationInfo(Entity entity) {
109 return _infoMap.putIfAbsent(entity, () { 115 return _infoMap.putIfAbsent(entity, () {
(...skipping 30 matching lines...) Expand all
140 bool variableIsUsedInTryOrSync(Local variable) => 146 bool variableIsUsedInTryOrSync(Local variable) =>
141 _localsUsedInTryOrSync.contains(variable); 147 _localsUsedInTryOrSync.contains(variable);
142 148
143 String toString() { 149 String toString() {
144 StringBuffer sb = new StringBuffer(); 150 StringBuffer sb = new StringBuffer();
145 sb.write('this=$thisLocal,'); 151 sb.write('this=$thisLocal,');
146 sb.write('localsUsedInTryOrSync={${_localsUsedInTryOrSync.join(', ')}}'); 152 sb.write('localsUsedInTryOrSync={${_localsUsedInTryOrSync.join(', ')}}');
147 return sb.toString(); 153 return sb.toString();
148 } 154 }
149 } 155 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698