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

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

Issue 895813006: dart2js: store typeVariableReader stubs in the model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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) 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 library dart2js.new_js_emitter.model_emitter; 5 library dart2js.new_js_emitter.model_emitter;
6 6
7 import '../../dart2jslib.dart' show Compiler; 7 import '../../dart2jslib.dart' show Compiler;
8 import '../../dart_types.dart' show DartType; 8 import '../../dart_types.dart' show DartType;
9 import '../../elements/elements.dart' show ClassElement; 9 import '../../elements/elements.dart' show ClassElement;
10 import '../../js/js.dart' as js; 10 import '../../js/js.dart' as js;
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 elements.add(js.number(mixin.mixinClass.holder.index)); 479 elements.add(js.number(mixin.mixinClass.holder.index));
480 if (cls.isDirectlyInstantiated) { 480 if (cls.isDirectlyInstantiated) {
481 elements.add(_generateConstructor(cls)); 481 elements.add(_generateConstructor(cls));
482 } 482 }
483 } else { 483 } else {
484 elements.add(_generateConstructor(cls)); 484 elements.add(_generateConstructor(cls));
485 } 485 }
486 Iterable<Method> methods = cls.methods; 486 Iterable<Method> methods = cls.methods;
487 Iterable<Method> isChecks = cls.isChecks; 487 Iterable<Method> isChecks = cls.isChecks;
488 Iterable<Method> callStubs = cls.callStubs; 488 Iterable<Method> callStubs = cls.callStubs;
489 Iterable<Method> typeVariableReaderStubs = cls.typeVariableReaderStubs;
489 Iterable<Method> noSuchMethodStubs = cls.noSuchMethodStubs; 490 Iterable<Method> noSuchMethodStubs = cls.noSuchMethodStubs;
490 Iterable<Method> gettersSetters = _generateGettersSetters(cls); 491 Iterable<Method> gettersSetters = _generateGettersSetters(cls);
491 Iterable<Method> allMethods = 492 Iterable<Method> allMethods =
492 [methods, isChecks, callStubs, noSuchMethodStubs, gettersSetters] 493 [methods, isChecks, callStubs, typeVariableReaderStubs,
493 .expand((x) => x); 494 noSuchMethodStubs, gettersSetters].expand((x) => x);
494 elements.addAll(allMethods.expand(emitInstanceMethod)); 495 elements.addAll(allMethods.expand(emitInstanceMethod));
495 496
496 return unparse(compiler, new js.ArrayInitializer(elements)); 497 return unparse(compiler, new js.ArrayInitializer(elements));
497 } 498 }
498 499
499 js.Expression emitLazyInitializer(StaticField field) { 500 js.Expression emitLazyInitializer(StaticField field) {
500 assert(field.isLazy); 501 assert(field.isLazy);
501 return unparse(compiler, field.code); 502 return unparse(compiler, field.code);
502 } 503 }
503 504
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 932
932 var end = Date.now(); 933 var end = Date.now();
933 print('Setup: ' + (end - start) + ' ms.'); 934 print('Setup: ' + (end - start) + ' ms.');
934 935
935 #main(); // Start main. 936 #main(); // Start main.
936 937
937 }(Date.now(), #code) 938 }(Date.now(), #code)
938 }"""; 939 }""";
939 940
940 } 941 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698