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

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

Issue 840563005: dart2js: Use is-checks from the model in the old emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/model.dart ('k') | pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698