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

Unified Diff: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart

Issue 800903005: dart2js OldEmitter: name anonymous function so it does not need to be copied in deferred parts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 5 years, 11 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 | pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
index 1ad8c6382e785678ae8fd44d0fc99e78a38d705e..a65a98a73b14a62674f9ebd3193491df969a01c7 100644
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
@@ -1499,8 +1499,10 @@ class OldEmitter implements Emitter {
if (isProgramSplit) {
mainBuffer
.write('${globalsHolder}.${namer.isolateName}$_=$_'
- '${namer.isolateName}$N'
- '${globalsHolder}.$initName$_=${_}$initName$N');
+ '${namer.isolateName}$N'
+ '${globalsHolder}.$initName$_=${_}$initName$N'
+ '${globalsHolder}.$parseReflectionDataName$_=$_'
+ '$parseReflectionDataName$N');
}
mainBuffer.write('init()$N$n');
mainBuffer.write('$isolateProperties$_=$_$isolatePropertiesName$N');
@@ -1535,15 +1537,15 @@ class OldEmitter implements Emitter {
}
mainBuffer
- ..write('(')
..write(
jsAst.prettyPrint(
getReflectionDataParser(this, backend),
compiler))
- ..write(')')
- ..write('([$n')
- ..write(libraryBuffer)
- ..write('])$N');
+ ..write(n);
+
+ mainBuffer..write('$parseReflectionDataName([$n')
+ ..write(libraryBuffer)
+ ..write('])$N');
}
interceptorEmitter.emitGetInterceptorMethods(mainBuffer);
@@ -1975,6 +1977,8 @@ function(originalDescriptor, name, holder, isStatic, globalFunctionsAccess) {
}
outputBuffer
..write('var init$_=$_${globalsHolder}.init$N')
+ ..write('var $parseReflectionDataName$_=$_'
+ '$globalsHolder.$parseReflectionDataName$N')
..write('var ${namer.isolateName}$_=$_'
'${globalsHolder}.${namer.isolateName}$N');
if (libraryDescriptorBuffer != null) {
@@ -1983,14 +1987,8 @@ function(originalDescriptor, name, holder, isStatic, globalFunctionsAccess) {
// slow object in V8, so instead we should do something similar
// to Isolate.$finishIsolateConstructor.
outputBuffer
- ..write('var ${namer.currentIsolate}$_=$_$isolatePropertiesName;$n')
- ..write('(')
- ..write(
- jsAst.prettyPrint(
- getReflectionDataParser(this, backend),
- compiler, monitor: compiler.dumpInfoTask))
- ..write(')')
- ..write('([$n')
+ ..write('var ${namer.currentIsolate}$_=$_$isolatePropertiesName$N')
+ ..write('$parseReflectionDataName([$n')
..addBuffer(libraryDescriptorBuffer)
..write('])$N');
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698