| 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 part of js_backend; | 5 part of js_backend; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A function element that represents a closure call. The signature is copied | 8 * A function element that represents a closure call. The signature is copied |
| 9 * from the given element. | 9 * from the given element. |
| 10 */ | 10 */ |
| (...skipping 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2610 } | 2610 } |
| 2611 | 2611 |
| 2612 // Finally, sort the classes. | 2612 // Finally, sort the classes. |
| 2613 List<ClassElement> sortedClasses = Elements.sortedByPosition(neededClasses); | 2613 List<ClassElement> sortedClasses = Elements.sortedByPosition(neededClasses); |
| 2614 | 2614 |
| 2615 // If we need noSuchMethod support, we run through all needed | 2615 // If we need noSuchMethod support, we run through all needed |
| 2616 // classes to figure out if we need the support on any native | 2616 // classes to figure out if we need the support on any native |
| 2617 // class. If so, we let the native emitter deal with it. | 2617 // class. If so, we let the native emitter deal with it. |
| 2618 if (compiler.enabledNoSuchMethod) { | 2618 if (compiler.enabledNoSuchMethod) { |
| 2619 SourceString noSuchMethodName = Compiler.NO_SUCH_METHOD; | 2619 SourceString noSuchMethodName = Compiler.NO_SUCH_METHOD; |
| 2620 Selector noSuchMethodSelector = new Selector.noSuchMethod(); | 2620 Selector noSuchMethodSelector = compiler.noSuchMethodSelector; |
| 2621 for (ClassElement element in sortedClasses) { | 2621 for (ClassElement element in sortedClasses) { |
| 2622 if (!element.isNative()) continue; | 2622 if (!element.isNative()) continue; |
| 2623 Element member = element.lookupLocalMember(noSuchMethodName); | 2623 Element member = element.lookupLocalMember(noSuchMethodName); |
| 2624 if (member == null) continue; | 2624 if (member == null) continue; |
| 2625 if (noSuchMethodSelector.applies(member, compiler)) { | 2625 if (noSuchMethodSelector.applies(member, compiler)) { |
| 2626 nativeEmitter.handleNoSuchMethod = true; | 2626 nativeEmitter.handleNoSuchMethod = true; |
| 2627 break; | 2627 break; |
| 2628 } | 2628 } |
| 2629 } | 2629 } |
| 2630 } | 2630 } |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3045 """; | 3045 """; |
| 3046 const String HOOKS_API_USAGE = """ | 3046 const String HOOKS_API_USAGE = """ |
| 3047 // The code supports the following hooks: | 3047 // The code supports the following hooks: |
| 3048 // dartPrint(message) - if this function is defined it is called | 3048 // dartPrint(message) - if this function is defined it is called |
| 3049 // instead of the Dart [print] method. | 3049 // instead of the Dart [print] method. |
| 3050 // dartMainRunner(main) - if this function is defined, the Dart [main] | 3050 // dartMainRunner(main) - if this function is defined, the Dart [main] |
| 3051 // method will not be invoked directly. | 3051 // method will not be invoked directly. |
| 3052 // Instead, a closure that will invoke [main] is | 3052 // Instead, a closure that will invoke [main] is |
| 3053 // passed to [dartMainRunner]. | 3053 // passed to [dartMainRunner]. |
| 3054 """; | 3054 """; |
| OLD | NEW |