| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 class NativeEmitter { | 7 class NativeEmitter { |
| 8 | 8 |
| 9 final Map<Element, ClassBuilder> cachedBuilders; | 9 final Map<Element, ClassBuilder> cachedBuilders; |
| 10 | 10 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 } | 318 } |
| 319 builder.superName = superclass.name; | 319 builder.superName = superclass.name; |
| 320 | 320 |
| 321 bool hasFields = emitterTask.oldEmitter.classEmitter.emitFields( | 321 bool hasFields = emitterTask.oldEmitter.classEmitter.emitFields( |
| 322 classElement, builder, classIsNative: true); | 322 classElement, builder, classIsNative: true); |
| 323 int propertyCount = builder.properties.length; | 323 int propertyCount = builder.properties.length; |
| 324 emitterTask.oldEmitter.classEmitter.emitCheckedClassSetters( | 324 emitterTask.oldEmitter.classEmitter.emitCheckedClassSetters( |
| 325 classElement, builder); | 325 classElement, builder); |
| 326 emitterTask.oldEmitter.classEmitter.emitInstanceMembers( | 326 emitterTask.oldEmitter.classEmitter.emitInstanceMembers( |
| 327 classElement, builder); | 327 classElement, builder); |
| 328 emitterTask.oldEmitter.typeTestEmitter.emitIsTests(classElement, builder); | 328 emitterTask.oldEmitter.classEmitter |
| 329 .emitRuntimeTypeInformation(cls, builder); |
| 329 | 330 |
| 330 if (!hasFields && | 331 if (!hasFields && |
| 331 builder.properties.length == propertyCount && | 332 builder.properties.length == propertyCount && |
| 332 superclass is! MixinApplicationElement) { | 333 superclass is! MixinApplicationElement) { |
| 333 builder.isTrivial = true; | 334 builder.isTrivial = true; |
| 334 } | 335 } |
| 335 | 336 |
| 336 return builder; | 337 return builder; |
| 337 } | 338 } |
| 338 | 339 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 targetOutput.add(';'); | 486 targetOutput.add(';'); |
| 486 } | 487 } |
| 487 targetOutput.addBuffer(jsAst.prettyPrint( | 488 targetOutput.addBuffer(jsAst.prettyPrint( |
| 488 new jsAst.ExpressionStatement(init), compiler)); | 489 new jsAst.ExpressionStatement(init), compiler)); |
| 489 targetOutput.add('\n'); | 490 targetOutput.add('\n'); |
| 490 } | 491 } |
| 491 | 492 |
| 492 targetOutput.add('\n'); | 493 targetOutput.add('\n'); |
| 493 } | 494 } |
| 494 } | 495 } |
| OLD | NEW |