| 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 3216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3227 } | 3227 } |
| 3228 mainBuffer.write('])$N'); | 3228 mainBuffer.write('])$N'); |
| 3229 | 3229 |
| 3230 emitFinishClassesInvocationIfNecessary(mainBuffer); | 3230 emitFinishClassesInvocationIfNecessary(mainBuffer); |
| 3231 classesCollector = oldClassesCollector; | 3231 classesCollector = oldClassesCollector; |
| 3232 } | 3232 } |
| 3233 | 3233 |
| 3234 emitStaticFunctionGetters(mainBuffer); | 3234 emitStaticFunctionGetters(mainBuffer); |
| 3235 | 3235 |
| 3236 emitRuntimeTypeSupport(mainBuffer); | 3236 emitRuntimeTypeSupport(mainBuffer); |
| 3237 emitGetInterceptorMethods(mainBuffer); |
| 3238 // Constants in checked mode call into RTI code to set type information |
| 3239 // which may need getInterceptor methods, so we have to make sure that |
| 3240 // [emitGetInterceptorMethods] has been called. |
| 3237 emitCompileTimeConstants(mainBuffer); | 3241 emitCompileTimeConstants(mainBuffer); |
| 3238 // Static field initializations require the classes and compile-time | 3242 // Static field initializations require the classes and compile-time |
| 3239 // constants to be set up. | 3243 // constants to be set up. |
| 3240 emitStaticNonFinalFieldInitializations(mainBuffer); | 3244 emitStaticNonFinalFieldInitializations(mainBuffer); |
| 3241 emitOneShotInterceptors(mainBuffer); | 3245 emitOneShotInterceptors(mainBuffer); |
| 3242 emitInterceptedNames(mainBuffer); | 3246 emitInterceptedNames(mainBuffer); |
| 3243 emitGetInterceptorMethods(mainBuffer); | |
| 3244 emitLazilyInitializedStaticFields(mainBuffer); | 3247 emitLazilyInitializedStaticFields(mainBuffer); |
| 3245 | 3248 |
| 3246 mainBuffer.add(nativeBuffer); | 3249 mainBuffer.add(nativeBuffer); |
| 3247 | 3250 |
| 3248 | 3251 |
| 3249 isolateProperties = isolatePropertiesName; | 3252 isolateProperties = isolatePropertiesName; |
| 3250 // The following code should not use the short-hand for the | 3253 // The following code should not use the short-hand for the |
| 3251 // initialStatics. | 3254 // initialStatics. |
| 3252 mainBuffer.add('var ${namer.CURRENT_ISOLATE}$_=${_}null$N'); | 3255 mainBuffer.add('var ${namer.CURRENT_ISOLATE}$_=${_}null$N'); |
| 3253 | 3256 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3452 | 3455 |
| 3453 const String HOOKS_API_USAGE = """ | 3456 const String HOOKS_API_USAGE = """ |
| 3454 // The code supports the following hooks: | 3457 // The code supports the following hooks: |
| 3455 // dartPrint(message) - if this function is defined it is called | 3458 // dartPrint(message) - if this function is defined it is called |
| 3456 // instead of the Dart [print] method. | 3459 // instead of the Dart [print] method. |
| 3457 // dartMainRunner(main) - if this function is defined, the Dart [main] | 3460 // dartMainRunner(main) - if this function is defined, the Dart [main] |
| 3458 // method will not be invoked directly. | 3461 // method will not be invoked directly. |
| 3459 // Instead, a closure that will invoke [main] is | 3462 // Instead, a closure that will invoke [main] is |
| 3460 // passed to [dartMainRunner]. | 3463 // passed to [dartMainRunner]. |
| 3461 """; | 3464 """; |
| OLD | NEW |