| 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 * A function element that represents a closure call. The signature is copied | 6 * A function element that represents a closure call. The signature is copied |
| 7 * from the given element. | 7 * from the given element. |
| 8 */ | 8 */ |
| 9 class ClosureInvocationElement extends FunctionElement { | 9 class ClosureInvocationElement extends FunctionElement { |
| 10 ClosureInvocationElement(SourceString name, | 10 ClosureInvocationElement(SourceString name, |
| (...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 emitStaticFunctions(mainBuffer); | 1304 emitStaticFunctions(mainBuffer); |
| 1305 emitStaticFunctionGetters(mainBuffer); | 1305 emitStaticFunctionGetters(mainBuffer); |
| 1306 // We need to finish the classes before we construct compile time | 1306 // We need to finish the classes before we construct compile time |
| 1307 // constants. | 1307 // constants. |
| 1308 emitFinishClassesInvocationIfNecessary(mainBuffer); | 1308 emitFinishClassesInvocationIfNecessary(mainBuffer); |
| 1309 emitCompileTimeConstants(mainBuffer); | 1309 emitCompileTimeConstants(mainBuffer); |
| 1310 // Static field initializations require the classes and compile-time | 1310 // Static field initializations require the classes and compile-time |
| 1311 // constants to be set up. | 1311 // constants to be set up. |
| 1312 emitStaticNonFinalFieldInitializations(mainBuffer); | 1312 emitStaticNonFinalFieldInitializations(mainBuffer); |
| 1313 emitLazilyInitializedStaticFields(mainBuffer); | 1313 emitLazilyInitializedStaticFields(mainBuffer); |
| 1314 if (compiler.enabledRuntimeType) { | |
| 1315 mainBuffer.add('$isolateProperties.runtimeTypeCache = {};\n'); | |
| 1316 } | |
| 1317 | 1314 |
| 1318 isolateProperties = isolatePropertiesName; | 1315 isolateProperties = isolatePropertiesName; |
| 1319 // The following code should not use the short-hand for the | 1316 // The following code should not use the short-hand for the |
| 1320 // initialStatics. | 1317 // initialStatics. |
| 1321 mainBuffer.add('var ${namer.CURRENT_ISOLATE} = null;\n'); | 1318 mainBuffer.add('var ${namer.CURRENT_ISOLATE} = null;\n'); |
| 1322 mainBuffer.add(boundClosureBuffer); | 1319 mainBuffer.add(boundClosureBuffer); |
| 1323 emitFinishClassesInvocationIfNecessary(mainBuffer); | 1320 emitFinishClassesInvocationIfNecessary(mainBuffer); |
| 1324 // After this assignment we will produce invalid JavaScript code if we use | 1321 // After this assignment we will produce invalid JavaScript code if we use |
| 1325 // the classesCollector variable. | 1322 // the classesCollector variable. |
| 1326 classesCollector = 'classesCollector should not be used from now on'; | 1323 classesCollector = 'classesCollector should not be used from now on'; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 const String HOOKS_API_USAGE = """ | 1361 const String HOOKS_API_USAGE = """ |
| 1365 // Generated by dart2js, the Dart to JavaScript compiler. | 1362 // Generated by dart2js, the Dart to JavaScript compiler. |
| 1366 // The code supports the following hooks: | 1363 // The code supports the following hooks: |
| 1367 // dartPrint(message) - if this function is defined it is called | 1364 // dartPrint(message) - if this function is defined it is called |
| 1368 // instead of the Dart [print] method. | 1365 // instead of the Dart [print] method. |
| 1369 // dartMainRunner(main) - if this function is defined, the Dart [main] | 1366 // dartMainRunner(main) - if this function is defined, the Dart [main] |
| 1370 // method will not be invoked directly. | 1367 // method will not be invoked directly. |
| 1371 // Instead, a closure that will invoke [main] is | 1368 // Instead, a closure that will invoke [main] is |
| 1372 // passed to [dartMainRunner]. | 1369 // passed to [dartMainRunner]. |
| 1373 """; | 1370 """; |
| OLD | NEW |