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 library compiler.src.inferrer.list_tracer; | 5 library compiler.src.inferrer.list_tracer; |
6 | 6 |
7 import '../elements/entities.dart'; | 7 import '../elements/entities.dart'; |
8 import '../js_backend/backend.dart' show JavaScriptBackend; | 8 import '../js_backend/backend.dart' show JavaScriptBackend; |
9 import '../universe/selector.dart' show Selector; | 9 import '../universe/selector.dart' show Selector; |
10 import '../util/util.dart' show Setlet; | 10 import '../util/util.dart' show Setlet; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info) { | 161 visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info) { |
162 bailout('Passed to a closure'); | 162 bailout('Passed to a closure'); |
163 } | 163 } |
164 | 164 |
165 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { | 165 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { |
166 super.visitStaticCallSiteTypeInformation(info); | 166 super.visitStaticCallSiteTypeInformation(info); |
167 MemberEntity called = info.calledElement; | 167 MemberEntity called = info.calledElement; |
168 if (inferrer.closedWorld.commonElements.isForeign(called) && | 168 if (inferrer.closedWorld.commonElements.isForeign(called) && |
169 called.name == JavaScriptBackend.JS) { | 169 called.name == JavaScriptBackend.JS) { |
170 bailout('Used in JS ${info.call}'); | 170 bailout('Used in JS ${info.debugName}'); |
171 } | 171 } |
172 } | 172 } |
173 | 173 |
174 visitDynamicCallSiteTypeInformation(DynamicCallSiteTypeInformation info) { | 174 visitDynamicCallSiteTypeInformation(DynamicCallSiteTypeInformation info) { |
175 super.visitDynamicCallSiteTypeInformation(info); | 175 super.visitDynamicCallSiteTypeInformation(info); |
176 Selector selector = info.selector; | 176 Selector selector = info.selector; |
177 String selectorName = selector.name; | 177 String selectorName = selector.name; |
178 if (currentUser == info.receiver) { | 178 if (currentUser == info.receiver) { |
179 if (!okListSelectorsSet.contains(selectorName)) { | 179 if (!okListSelectorsSet.contains(selectorName)) { |
180 if (selector.isCall) { | 180 if (selector.isCall) { |
(...skipping 24 matching lines...) Expand all Loading... |
205 callsGrowableMethod = true; | 205 callsGrowableMethod = true; |
206 assignments.add(inferrer.types.nullType); | 206 assignments.add(inferrer.types.nullType); |
207 } | 207 } |
208 } else if (selector.isCall && | 208 } else if (selector.isCall && |
209 !info.targets.every((element) => element.isFunction)) { | 209 !info.targets.every((element) => element.isFunction)) { |
210 bailout('Passed to a closure'); | 210 bailout('Passed to a closure'); |
211 return; | 211 return; |
212 } | 212 } |
213 } | 213 } |
214 } | 214 } |
OLD | NEW |