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

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

Issue 1220233003: dart2js: Give the globals holder for deferred loading a fixed name. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 7
8 class OldEmitter implements Emitter { 8 class OldEmitter implements Emitter {
9 final Compiler compiler; 9 final Compiler compiler;
10 final CodeEmitterTask task; 10 final CodeEmitterTask task;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 /// The name of the property that contains all field names. 197 /// The name of the property that contains all field names.
198 /// 198 ///
199 /// This property is added to constructors when isolate support is enabled. 199 /// This property is added to constructors when isolate support is enabled.
200 static const String FIELD_NAMES_PROPERTY_NAME = r"$__fields__"; 200 static const String FIELD_NAMES_PROPERTY_NAME = r"$__fields__";
201 201
202 /// For deferred loading we communicate the initializers via this global var. 202 /// For deferred loading we communicate the initializers via this global var.
203 final String deferredInitializers = r"$dart_deferred_initializers$"; 203 final String deferredInitializers = r"$dart_deferred_initializers$";
204 204
205 /// Contains the global state that is needed to initialize and load a 205 /// Contains the global state that is needed to initialize and load a
206 /// deferred library. 206 /// deferred library.
207 jsAst.Name get globalsHolder => namer.internalGlobal("globalsHolder"); 207 String get globalsHolder => r"$globals$";
208 208
209 @override 209 @override
210 jsAst.Expression generateEmbeddedGlobalAccess(String global) { 210 jsAst.Expression generateEmbeddedGlobalAccess(String global) {
211 return js(generateEmbeddedGlobalAccessString(global)); 211 return js(generateEmbeddedGlobalAccessString(global));
212 } 212 }
213 213
214 String generateEmbeddedGlobalAccessString(String global) { 214 String generateEmbeddedGlobalAccessString(String global) {
215 // TODO(floitsch): don't use 'init' as global embedder storage. 215 // TODO(floitsch): don't use 'init' as global embedder storage.
216 return '$initName.$global'; 216 return '$initName.$global';
217 } 217 }
(...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 1996 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
1997 if (element.isInstanceMember) { 1997 if (element.isInstanceMember) {
1998 cachedClassBuilders.remove(element.enclosingClass); 1998 cachedClassBuilders.remove(element.enclosingClass);
1999 1999
2000 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 2000 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
2001 2001
2002 } 2002 }
2003 } 2003 }
2004 } 2004 }
2005 } 2005 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698