| 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 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |