| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 | 5 |
| 6 /** | 6 /** |
| 7 * If true, print a warning for each method that was resolved, but not | 7 * If true, print a warning for each method that was resolved, but not |
| 8 * compiled. | 8 * compiled. |
| 9 */ | 9 */ |
| 10 final bool REPORT_EXCESS_RESOLUTION = false; | 10 final bool REPORT_EXCESS_RESOLUTION = false; |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 } | 260 } |
| 261 | 261 |
| 262 void enableNoSuchMethod(Element element) { | 262 void enableNoSuchMethod(Element element) { |
| 263 // TODO(ahe): Move this method to Enqueuer. | 263 // TODO(ahe): Move this method to Enqueuer. |
| 264 if (enabledNoSuchMethod) return; | 264 if (enabledNoSuchMethod) return; |
| 265 if (element.getEnclosingClass() === objectClass) { | 265 if (element.getEnclosingClass() === objectClass) { |
| 266 enqueuer.resolution.registerDynamicInvocationOf(element); | 266 enqueuer.resolution.registerDynamicInvocationOf(element); |
| 267 return; | 267 return; |
| 268 } | 268 } |
| 269 enabledNoSuchMethod = true; | 269 enabledNoSuchMethod = true; |
| 270 enqueuer.resolution.registerInvocation(NO_SUCH_METHOD, | 270 Selector selector = new Selector.noSuchMethod(); |
| 271 Selector.INVOCATION_2); | 271 enqueuer.resolution.registerInvocation(NO_SUCH_METHOD, selector); |
| 272 enqueuer.codegen.registerInvocation(NO_SUCH_METHOD, | 272 enqueuer.codegen.registerInvocation(NO_SUCH_METHOD, selector); |
| 273 Selector.INVOCATION_2); | |
| 274 } | 273 } |
| 275 | 274 |
| 276 void enableIsolateSupport(LibraryElement element) { | 275 void enableIsolateSupport(LibraryElement element) { |
| 277 // TODO(ahe): Move this method to Enqueuer. | 276 // TODO(ahe): Move this method to Enqueuer. |
| 278 isolateLibrary = element; | 277 isolateLibrary = element; |
| 279 enqueuer.resolution.addToWorkList(element.find(START_ROOT_ISOLATE)); | 278 enqueuer.resolution.addToWorkList(element.find(START_ROOT_ISOLATE)); |
| 280 enqueuer.resolution.addToWorkList( | 279 enqueuer.resolution.addToWorkList( |
| 281 element.find(const SourceString('_currentIsolate'))); | 280 element.find(const SourceString('_currentIsolate'))); |
| 282 enqueuer.resolution.addToWorkList( | 281 enqueuer.resolution.addToWorkList( |
| 283 element.find(const SourceString('_callInIsolate'))); | 282 element.find(const SourceString('_callInIsolate'))); |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 final endOffset = end.charOffset + end.slowCharCount; | 941 final endOffset = end.charOffset + end.slowCharCount; |
| 943 | 942 |
| 944 // [begin] and [end] might be the same for the same empty token. This | 943 // [begin] and [end] might be the same for the same empty token. This |
| 945 // happens for instance when scanning '$$'. | 944 // happens for instance when scanning '$$'. |
| 946 assert(endOffset >= beginOffset); | 945 assert(endOffset >= beginOffset); |
| 947 return f(beginOffset, endOffset); | 946 return f(beginOffset, endOffset); |
| 948 } | 947 } |
| 949 | 948 |
| 950 String toString() => 'SourceSpan($uri, $begin, $end)'; | 949 String toString() => 'SourceSpan($uri, $begin, $end)'; |
| 951 } | 950 } |
| OLD | NEW |