| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |