| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library dart2js.new_js_emitter.model_emitter; | 5 library dart2js.new_js_emitter.model_emitter; |
| 6 | 6 |
| 7 import '../../dart2jslib.dart' show Compiler; | 7 import '../../dart2jslib.dart' show Compiler; |
| 8 import '../../dart_types.dart' show DartType; | 8 import '../../dart_types.dart' show DartType; |
| 9 import '../../elements/elements.dart' show ClassElement; | 9 import '../../elements/elements.dart' show ClassElement; |
| 10 import '../../js/js.dart' as js; | 10 import '../../js/js.dart' as js; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 js.js.statement(parseFunctionDescriptorBoilerplate), | 109 js.js.statement(parseFunctionDescriptorBoilerplate), |
| 110 'cyclicThrow': | 110 'cyclicThrow': |
| 111 backend.emitter.staticFunctionAccess(backend.getCyclicThrowHelper()), | 111 backend.emitter.staticFunctionAccess(backend.getCyclicThrowHelper()), |
| 112 'outputContainsConstantList': program.outputContainsConstantList, | 112 'outputContainsConstantList': program.outputContainsConstantList, |
| 113 'embeddedGlobals': emitEmbeddedGlobals(program), | 113 'embeddedGlobals': emitEmbeddedGlobals(program), |
| 114 'constants': emitConstants(fragment.constants), | 114 'constants': emitConstants(fragment.constants), |
| 115 'staticNonFinals': | 115 'staticNonFinals': |
| 116 emitStaticNonFinalFields(fragment.staticNonFinalFields), | 116 emitStaticNonFinalFields(fragment.staticNonFinalFields), |
| 117 'operatorIsPrefix': js.string(namer.operatorIsPrefix), | 117 'operatorIsPrefix': js.string(namer.operatorIsPrefix), |
| 118 'eagerClasses': emitEagerClassInitializations(fragment.libraries), | 118 'eagerClasses': emitEagerClassInitializations(fragment.libraries), |
| 119 'main': fragment.main, | 119 'invokeMain': fragment.invokeMain, |
| 120 'code': code}; | 120 'code': code}; |
| 121 | 121 |
| 122 holes.addAll(nativeHoles(program)); | 122 holes.addAll(nativeHoles(program)); |
| 123 | 123 |
| 124 return js.js.statement(boilerplate, holes); | 124 return js.js.statement(boilerplate, holes); |
| 125 } | 125 } |
| 126 | 126 |
| 127 Map<String, dynamic> nativeHoles(Program program) { | 127 Map<String, dynamic> nativeHoles(Program program) { |
| 128 Map<String, dynamic> nativeHoles = <String, dynamic>{}; | 128 Map<String, dynamic> nativeHoles = <String, dynamic>{}; |
| 129 | 129 |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 | 907 |
| 908 // Add native boilerplate code. | 908 // Add native boilerplate code. |
| 909 #nativeIsolateAffinityTagInitialization; | 909 #nativeIsolateAffinityTagInitialization; |
| 910 | 910 |
| 911 // Initialize eager classes. | 911 // Initialize eager classes. |
| 912 #eagerClasses; | 912 #eagerClasses; |
| 913 | 913 |
| 914 var end = Date.now(); | 914 var end = Date.now(); |
| 915 print('Setup: ' + (end - start) + ' ms.'); | 915 print('Setup: ' + (end - start) + ' ms.'); |
| 916 | 916 |
| 917 #main(); // Start main. | 917 #invokeMain; // Start main. |
| 918 | 918 |
| 919 }(Date.now(), #code) | 919 }(Date.now(), #code) |
| 920 }"""; | 920 }"""; |
| 921 | 921 |
| 922 } | 922 } |
| OLD | NEW |