| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 List<jsAst.Statement> buildTrivialNsmHandlers(){ | 321 List<jsAst.Statement> buildTrivialNsmHandlers(){ |
| 322 return nsmEmitter.buildTrivialNsmHandlers(); | 322 return nsmEmitter.buildTrivialNsmHandlers(); |
| 323 } | 323 } |
| 324 | 324 |
| 325 jsAst.Statement buildNativeInfoHandler( | 325 jsAst.Statement buildNativeInfoHandler( |
| 326 jsAst.Expression infoAccess, | 326 jsAst.Expression infoAccess, |
| 327 jsAst.Expression constructorAccess, | 327 jsAst.Expression constructorAccess, |
| 328 jsAst.Expression subclassReadGenerator(jsAst.Expression subclass), | 328 jsAst.Expression subclassReadGenerator(jsAst.Expression subclass), |
| 329 jsAst.Expression interceptorsByTagAccess, | 329 jsAst.Expression interceptorsByTagAccess, |
| 330 jsAst.Expression leafTagsAccess) { | 330 jsAst.Expression leafTagsAccess) { |
| 331 return nativeEmitter.buildNativeInfoHandler(infoAccess, constructorAccess, | 331 new NativeGenerator().buildNativeInfoHandler(infoAccess, constructorAccess, |
| 332 subclassReadGenerator, | 332 subclassReadGenerator, |
| 333 interceptorsByTagAccess, | 333 interceptorsByTagAccess, |
| 334 leafTagsAccess); | 334 leafTagsAccess); |
| 335 } | 335 } |
| 336 | 336 |
| 337 jsAst.ObjectInitializer generateInterceptedNamesSet() { | 337 jsAst.ObjectInitializer generateInterceptedNamesSet() { |
| 338 return interceptorEmitter.generateInterceptedNamesSet(); | 338 return interceptorEmitter.generateInterceptedNamesSet(); |
| 339 } | 339 } |
| 340 | 340 |
| 341 /// In minified mode we want to keep the name for the most common core types. | 341 /// In minified mode we want to keep the name for the most common core types. |
| 342 bool _isNativeTypeNeedingReflectionName(Element element) { | 342 bool _isNativeTypeNeedingReflectionName(Element element) { |
| 343 if (!element.isClass) return false; | 343 if (!element.isClass) return false; |
| 344 return (element == compiler.intClass || | 344 return (element == compiler.intClass || |
| (...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2002 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { | 2002 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { |
| 2003 if (element.isInstanceMember) { | 2003 if (element.isInstanceMember) { |
| 2004 cachedClassBuilders.remove(element.enclosingClass); | 2004 cachedClassBuilders.remove(element.enclosingClass); |
| 2005 | 2005 |
| 2006 nativeEmitter.cachedBuilders.remove(element.enclosingClass); | 2006 nativeEmitter.cachedBuilders.remove(element.enclosingClass); |
| 2007 | 2007 |
| 2008 } | 2008 } |
| 2009 } | 2009 } |
| 2010 } | 2010 } |
| 2011 } | 2011 } |
| OLD | NEW |