OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of type_graph_inferrer; | 5 part of type_graph_inferrer; |
6 | 6 |
7 /** | 7 /** |
8 * A set of selector names that [List] implements, that we know do not | 8 * A set of selector names that [List] implements, that we know do not |
9 * change the element type of the list, or let the list escape to code | 9 * change the element type of the list, or let the list escape to code |
10 * that might change the element type. | 10 * that might change the element type. |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 'because: $reason'); | 193 'because: $reason'); |
194 } | 194 } |
195 continueAnalyzing = false; | 195 continueAnalyzing = false; |
196 enableLengthTracking = false; | 196 enableLengthTracking = false; |
197 } | 197 } |
198 | 198 |
199 visitNarrowTypeInformation(NarrowTypeInformation info) {} | 199 visitNarrowTypeInformation(NarrowTypeInformation info) {} |
200 visitPhiElementTypeInformation(PhiElementTypeInformation info) {} | 200 visitPhiElementTypeInformation(PhiElementTypeInformation info) {} |
201 visitElementInContainerTypeInformation( | 201 visitElementInContainerTypeInformation( |
202 ElementInContainerTypeInformation info) {} | 202 ElementInContainerTypeInformation info) {} |
203 visitContainerTypeInformation(ContainerTypeInformation info) {} | 203 |
| 204 visitContainerTypeInformation(ContainerTypeInformation info) { |
| 205 if (container != info) { |
| 206 bailout('Stored in a container'); |
| 207 } |
| 208 } |
| 209 |
204 visitConcreteTypeInformation(ConcreteTypeInformation info) {} | 210 visitConcreteTypeInformation(ConcreteTypeInformation info) {} |
205 | 211 |
206 visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info) { | 212 visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info) { |
207 bailout('Passed to a closure'); | 213 bailout('Passed to a closure'); |
208 } | 214 } |
209 | 215 |
210 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { | 216 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { |
211 analyzedElements.add(info.caller); | 217 analyzedElements.add(info.caller); |
212 Element called = info.calledElement; | 218 Element called = info.calledElement; |
213 if (called.isForeign(compiler) && called.name == 'JS') { | 219 if (called.isForeign(compiler) && called.name == 'JS') { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 Element outermost = element.getOutermostEnclosingMemberOrTopLevel(); | 266 Element outermost = element.getOutermostEnclosingMemberOrTopLevel(); |
261 return outermost.declaration != element.declaration; | 267 return outermost.declaration != element.declaration; |
262 } | 268 } |
263 | 269 |
264 visitElementTypeInformation(ElementTypeInformation info) { | 270 visitElementTypeInformation(ElementTypeInformation info) { |
265 if (isClosure(info.element)) { | 271 if (isClosure(info.element)) { |
266 bailout('Returned from a closure'); | 272 bailout('Returned from a closure'); |
267 } | 273 } |
268 } | 274 } |
269 } | 275 } |
OLD | NEW |