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.js_emitter.lazy_emitter.model_emitter; | 5 library dart2js.js_emitter.lazy_emitter.model_emitter; |
6 | 6 |
7 import '../../constants/values.dart' show ConstantValue, FunctionConstantValue; | 7 import '../../constants/values.dart' show ConstantValue, FunctionConstantValue; |
8 import '../../dart2jslib.dart' show Compiler; | 8 import '../../dart2jslib.dart' show Compiler; |
9 import '../../elements/elements.dart' show ClassElement, FunctionElement; | 9 import '../../elements/elements.dart' show ClassElement, FunctionElement; |
10 import '../../js/js.dart' as js; | 10 import '../../js/js.dart' as js; |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 if (program.loadMap.isNotEmpty) { | 298 if (program.loadMap.isNotEmpty) { |
299 globals.addAll(emitEmbeddedGlobalsForDeferredLoading(program.loadMap)); | 299 globals.addAll(emitEmbeddedGlobalsForDeferredLoading(program.loadMap)); |
300 } | 300 } |
301 | 301 |
302 if (program.typeToInterceptorMap != null) { | 302 if (program.typeToInterceptorMap != null) { |
303 globals.add(new js.Property(js.string(TYPE_TO_INTERCEPTOR_MAP), | 303 globals.add(new js.Property(js.string(TYPE_TO_INTERCEPTOR_MAP), |
304 program.typeToInterceptorMap)); | 304 program.typeToInterceptorMap)); |
305 } | 305 } |
306 | 306 |
307 if (program.hasIsolateSupport) { | 307 if (program.hasIsolateSupport) { |
308 String isolateName = namer.currentIsolate; | 308 String isolateName = namer.staticStateHolder; |
309 globals.add( | 309 globals.add( |
310 new js.Property(js.string(CREATE_NEW_ISOLATE), | 310 new js.Property(js.string(CREATE_NEW_ISOLATE), |
311 js.js('function () { return $isolateName; }'))); | 311 js.js('function () { return $isolateName; }'))); |
312 // TODO(floitsch): add remaining isolate functions. | 312 // TODO(floitsch): add remaining isolate functions. |
313 } | 313 } |
314 | 314 |
315 globals.add(emitMangledGlobalNames()); | 315 globals.add(emitMangledGlobalNames()); |
316 | 316 |
317 globals.add(emitGetTypeFromName()); | 317 globals.add(emitGetTypeFromName()); |
318 | 318 |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 | 1238 |
1239 var end = Date.now(); | 1239 var end = Date.now(); |
1240 // print('Setup: ' + (end - start) + ' ms.'); | 1240 // print('Setup: ' + (end - start) + ' ms.'); |
1241 | 1241 |
1242 #invokeMain; // Start main. | 1242 #invokeMain; // Start main. |
1243 | 1243 |
1244 })(Date.now(), #code) | 1244 })(Date.now(), #code) |
1245 }"""; | 1245 }"""; |
1246 | 1246 |
1247 } | 1247 } |
OLD | NEW |