Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Unified Diff: sdk/lib/_internal/compiler/implementation/js_emitter/old_emitter/emitter.dart

Issue 595183003: Always initialize top-level `Isolate` for deferred libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/language/deferred_only_constant_lib.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_emitter/old_emitter/emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/old_emitter/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/old_emitter/emitter.dart
index 82f329ccbc55988a4848dd5b43ca513d21f0b4a7..afd2b9efd4d760ccfe816a66813623e9b49d671a 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/old_emitter/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/old_emitter/emitter.dart
@@ -1823,27 +1823,27 @@ class OldEmitter implements Emitter {
'${globalsHolder}.$globalObject$N');
}
outputBuffer
- .write('var init$_=$_${globalsHolder}.init$N');
+ ..write('var init$_=$_${globalsHolder}.init$N')
+ ..write('var ${namer.isolateName}$_=$_'
+ '${globalsHolder}.${namer.isolateName}$N');
if (libraryDescriptorBuffer != null) {
// TODO(ahe): This defines a lot of properties on the
// Isolate.prototype object. We know this will turn it into a
// slow object in V8, so instead we should do something similar
// to Isolate.$finishIsolateConstructor.
outputBuffer
- ..write('var ${namer.isolateName}$_=$_'
- '${globalsHolder}.${namer.isolateName}$N')
- ..write('var ${namer.currentIsolate}$_=$_$isolatePropertiesName$N')
- // The classesCollector object ($$).
- ..write('$classesCollector$_=${_}Object.create(null);$n')
- ..write('(')
- ..write(
- jsAst.prettyPrint(
- getReflectionDataParser(classesCollector, backend),
- compiler, monitor: compiler.dumpInfoTask))
- ..write(')')
- ..write('([$n')
- ..addBuffer(libraryDescriptorBuffer)
- ..write('])$N');
+ ..write('var ${namer.currentIsolate}$_=$_$isolatePropertiesName$N')
+ // The classesCollector object ($$).
+ ..write('$classesCollector$_=${_}Object.create(null);$n')
+ ..write('(')
+ ..write(
+ jsAst.prettyPrint(
+ getReflectionDataParser(classesCollector, backend),
+ compiler, monitor: compiler.dumpInfoTask))
+ ..write(')')
+ ..write('([$n')
+ ..addBuffer(libraryDescriptorBuffer)
+ ..write('])$N');
if (outputClassLists.containsKey(outputUnit)) {
outputBuffer.write(
« no previous file with comments | « no previous file | tests/language/deferred_only_constant_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698