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

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

Issue 2959683002: Add compile_from_dill_fast_startup_test (Closed)
Patch Set: Cleanup. Created 3 years, 5 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.startup_emitter.model_emitter; 5 part of dart2js.js_emitter.startup_emitter.model_emitter;
6 6
7 /// The name of the property that stores the tear-off getter on a static 7 /// The name of the property that stores the tear-off getter on a static
8 /// function. 8 /// function.
9 /// 9 ///
10 /// This property is only used when isolates are used. 10 /// This property is only used when isolates are used.
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 /// 775 ///
776 /// This section updates the prototype-property of all constructors in the 776 /// This section updates the prototype-property of all constructors in the
777 /// global holders. 777 /// global holders.
778 js.Statement emitPrototypes(Fragment fragment, {softDeferred = false}) { 778 js.Statement emitPrototypes(Fragment fragment, {softDeferred = false}) {
779 List<js.Statement> assignments = fragment.libraries 779 List<js.Statement> assignments = fragment.libraries
780 .expand((Library library) => library.classes) 780 .expand((Library library) => library.classes)
781 .where((Class cls) => cls.isSoftDeferred == softDeferred) 781 .where((Class cls) => cls.isSoftDeferred == softDeferred)
782 .map((Class cls) { 782 .map((Class cls) {
783 var proto = js.js.statement( 783 var proto = js.js.statement(
784 '#.prototype = #;', [classReference(cls), emitPrototype(cls)]); 784 '#.prototype = #;', [classReference(cls), emitPrototype(cls)]);
785 ClassElement element = cls.element; 785 ClassEntity element = cls.element;
786 compiler.dumpInfoTask.registerElementAst(element, proto); 786 compiler.dumpInfoTask.registerElementAst(element, proto);
787 compiler.dumpInfoTask.registerElementAst(element.library, proto); 787 compiler.dumpInfoTask.registerElementAst(element.library, proto);
788 return proto; 788 return proto;
789 }).toList(growable: false); 789 }).toList(growable: false);
790 790
791 return new js.Block(assignments); 791 return new js.Block(assignments);
792 } 792 }
793 793
794 /// Emits the prototype of the given class [cls]. 794 /// Emits the prototype of the given class [cls].
795 /// 795 ///
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 } 1553 }
1554 statements.add(js.js.statement("setOrUpdateInterceptorsByTag(#);", 1554 statements.add(js.js.statement("setOrUpdateInterceptorsByTag(#);",
1555 js.objectLiteral(interceptorsByTag))); 1555 js.objectLiteral(interceptorsByTag)));
1556 statements.add( 1556 statements.add(
1557 js.js.statement("setOrUpdateLeafTags(#);", js.objectLiteral(leafTags))); 1557 js.js.statement("setOrUpdateLeafTags(#);", js.objectLiteral(leafTags)));
1558 statements.addAll(subclassAssignments); 1558 statements.addAll(subclassAssignments);
1559 1559
1560 return wrapPhase('nativeSupport', statements); 1560 return wrapPhase('nativeSupport', statements);
1561 } 1561 }
1562 } 1562 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698