| 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 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3167 } | 3167 } |
| 3168 mainBuffer.write('])$N'); | 3168 mainBuffer.write('])$N'); |
| 3169 | 3169 |
| 3170 emitFinishClassesInvocationIfNecessary(mainBuffer); | 3170 emitFinishClassesInvocationIfNecessary(mainBuffer); |
| 3171 classesCollector = oldClassesCollector; | 3171 classesCollector = oldClassesCollector; |
| 3172 } | 3172 } |
| 3173 | 3173 |
| 3174 emitStaticFunctionGetters(mainBuffer); | 3174 emitStaticFunctionGetters(mainBuffer); |
| 3175 | 3175 |
| 3176 emitRuntimeTypeSupport(mainBuffer); | 3176 emitRuntimeTypeSupport(mainBuffer); |
| 3177 emitGetInterceptorMethods(mainBuffer); |
| 3178 // Constants in checked mode call into RTI code to set type information |
| 3179 // which may need getInterceptor methods, so we have to make sure that |
| 3180 // [emitGetInterceptorMethods] has been called. |
| 3177 emitCompileTimeConstants(mainBuffer); | 3181 emitCompileTimeConstants(mainBuffer); |
| 3178 // Static field initializations require the classes and compile-time | 3182 // Static field initializations require the classes and compile-time |
| 3179 // constants to be set up. | 3183 // constants to be set up. |
| 3180 emitStaticNonFinalFieldInitializations(mainBuffer); | 3184 emitStaticNonFinalFieldInitializations(mainBuffer); |
| 3181 emitOneShotInterceptors(mainBuffer); | 3185 emitOneShotInterceptors(mainBuffer); |
| 3182 emitInterceptedNames(mainBuffer); | 3186 emitInterceptedNames(mainBuffer); |
| 3183 emitGetInterceptorMethods(mainBuffer); | |
| 3184 emitLazilyInitializedStaticFields(mainBuffer); | 3187 emitLazilyInitializedStaticFields(mainBuffer); |
| 3185 | 3188 |
| 3186 mainBuffer.add(nativeBuffer); | 3189 mainBuffer.add(nativeBuffer); |
| 3187 | 3190 |
| 3188 | 3191 |
| 3189 isolateProperties = isolatePropertiesName; | 3192 isolateProperties = isolatePropertiesName; |
| 3190 // The following code should not use the short-hand for the | 3193 // The following code should not use the short-hand for the |
| 3191 // initialStatics. | 3194 // initialStatics. |
| 3192 mainBuffer.add('var ${namer.CURRENT_ISOLATE}$_=${_}null$N'); | 3195 mainBuffer.add('var ${namer.CURRENT_ISOLATE}$_=${_}null$N'); |
| 3193 | 3196 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3385 | 3388 |
| 3386 const String HOOKS_API_USAGE = """ | 3389 const String HOOKS_API_USAGE = """ |
| 3387 // The code supports the following hooks: | 3390 // The code supports the following hooks: |
| 3388 // dartPrint(message) - if this function is defined it is called | 3391 // dartPrint(message) - if this function is defined it is called |
| 3389 // instead of the Dart [print] method. | 3392 // instead of the Dart [print] method. |
| 3390 // dartMainRunner(main) - if this function is defined, the Dart [main] | 3393 // dartMainRunner(main) - if this function is defined, the Dart [main] |
| 3391 // method will not be invoked directly. | 3394 // method will not be invoked directly. |
| 3392 // Instead, a closure that will invoke [main] is | 3395 // Instead, a closure that will invoke [main] is |
| 3393 // passed to [dartMainRunner]. | 3396 // passed to [dartMainRunner]. |
| 3394 """; | 3397 """; |
| OLD | NEW |