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

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

Issue 865223002: dart2js: store call stubs in the model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 builder = new ClassBuilder(classElement, backend.namer); 317 builder = new ClassBuilder(classElement, backend.namer);
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 cls, builder, classIsNative: true); 322 cls, builder, classIsNative: true);
323 int propertyCount = builder.properties.length; 323 int propertyCount = builder.properties.length;
324 emitterTask.oldEmitter.classEmitter.emitCheckedClassSetters(cls, builder); 324 emitterTask.oldEmitter.classEmitter.emitCheckedClassSetters(cls, builder);
325 emitterTask.oldEmitter.classEmitter.emitInstanceMembers( 325 emitterTask.oldEmitter.classEmitter.emitInstanceMembers(
326 classElement, builder); 326 classElement, builder);
327 emitterTask.oldEmitter.classEmitter.emitCallStubs(cls, builder);
327 emitterTask.oldEmitter.classEmitter 328 emitterTask.oldEmitter.classEmitter
328 .emitRuntimeTypeInformation(cls, builder); 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;
(...skipping 148 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

Powered by Google App Engine
This is Rietveld 408576698