| 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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 js('supr = s[0]'), | 719 js('supr = s[0]'), |
| 720 js('var mixin = collectedClasses[s[1]]'), | 720 js('var mixin = collectedClasses[s[1]]'), |
| 721 js.forIn('d', 'mixin', [ | 721 js.forIn('d', 'mixin', [ |
| 722 js.if_('hasOwnProperty.call(mixin, d)' | 722 js.if_('hasOwnProperty.call(mixin, d)' |
| 723 '&& !hasOwnProperty.call(desc, d)', | 723 '&& !hasOwnProperty.call(desc, d)', |
| 724 js('desc[d] = mixin[d]')) | 724 js('desc[d] = mixin[d]')) |
| 725 ]), | 725 ]), |
| 726 ])), | 726 ])), |
| 727 | 727 |
| 728 js('var constructor = defineClass(name, cls, fields, desc)'), | 728 js('var constructor = defineClass(name, cls, fields, desc)'), |
| 729 optional(backend.hasRetainedMetadata, | 729 optional(backend.isTreeShakingDisabled, |
| 730 js('constructor["${namer.metadataField}"] = desc')), | 730 js('constructor["${namer.metadataField}"] = desc')), |
| 731 js('isolateProperties[cls] = constructor'), | 731 js('isolateProperties[cls] = constructor'), |
| 732 js.if_('supr', js('pendingClasses[cls] = supr')) | 732 js.if_('supr', js('pendingClasses[cls] = supr')) |
| 733 ]) | 733 ]) |
| 734 ]), | 734 ]), |
| 735 | 735 |
| 736 js('var finishedClasses = {}'), | 736 js('var finishedClasses = {}'), |
| 737 | 737 |
| 738 buildFinishClass(), | 738 buildFinishClass(), |
| 739 ]; | 739 ]; |
| (...skipping 3303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4043 | 4043 |
| 4044 const String HOOKS_API_USAGE = """ | 4044 const String HOOKS_API_USAGE = """ |
| 4045 // The code supports the following hooks: | 4045 // The code supports the following hooks: |
| 4046 // dartPrint(message) - if this function is defined it is called | 4046 // dartPrint(message) - if this function is defined it is called |
| 4047 // instead of the Dart [print] method. | 4047 // instead of the Dart [print] method. |
| 4048 // dartMainRunner(main) - if this function is defined, the Dart [main] | 4048 // dartMainRunner(main) - if this function is defined, the Dart [main] |
| 4049 // method will not be invoked directly. | 4049 // method will not be invoked directly. |
| 4050 // Instead, a closure that will invoke [main] is | 4050 // Instead, a closure that will invoke [main] is |
| 4051 // passed to [dartMainRunner]. | 4051 // passed to [dartMainRunner]. |
| 4052 """; | 4052 """; |
| OLD | NEW |