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

Side by Side Diff: pkg/compiler/lib/src/world.dart

Issue 1803303002: Move all flags to CompilerOptions (first step to stop passing the compiler to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
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 library dart2js.world; 5 library dart2js.world;
6 6
7 import 'closure.dart' show 7 import 'closure.dart' show
8 SynthesizedCallMethodElementX; 8 SynthesizedCallMethodElementX;
9 import 'common.dart'; 9 import 'common.dart';
10 import 'common/backend_api.dart' show 10 import 'common/backend_api.dart' show
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 if (directlyInstantiated) { 646 if (directlyInstantiated) {
647 node.isDirectlyInstantiated = true; 647 node.isDirectlyInstantiated = true;
648 } 648 }
649 } 649 }
650 650
651 void populate() { 651 void populate() {
652 /// Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated` 652 /// Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated`
653 /// properties of the [ClassHierarchyNode] for [cls]. 653 /// properties of the [ClassHierarchyNode] for [cls].
654 654
655 void addSubtypes(ClassElement cls) { 655 void addSubtypes(ClassElement cls) {
656 if (compiler.hasIncrementalSupport && !alreadyPopulated.add(cls)) { 656 if (compiler.options.hasIncrementalSupport &&
657 !alreadyPopulated.add(cls)) {
657 return; 658 return;
658 } 659 }
659 assert(cls.isDeclaration); 660 assert(cls.isDeclaration);
660 if (!cls.isResolved) { 661 if (!cls.isResolved) {
661 reporter.internalError(cls, 'Class "${cls.name}" is not resolved.'); 662 reporter.internalError(cls, 'Class "${cls.name}" is not resolved.');
662 } 663 }
663 664
664 _updateClassHierarchyNodeForClass(cls, directlyInstantiated: true); 665 _updateClassHierarchyNodeForClass(cls, directlyInstantiated: true);
665 666
666 // Walk through the superclasses, and record the types 667 // Walk through the superclasses, and record the types
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 // method of function classes that were generated for function 835 // method of function classes that were generated for function
835 // expressions. In such a case, we have to look at the original 836 // expressions. In such a case, we have to look at the original
836 // function expressions's element. 837 // function expressions's element.
837 // TODO(herhut): Generate classes for function expressions earlier. 838 // TODO(herhut): Generate classes for function expressions earlier.
838 if (element is SynthesizedCallMethodElementX) { 839 if (element is SynthesizedCallMethodElementX) {
839 return getMightBePassedToApply(element.expression); 840 return getMightBePassedToApply(element.expression);
840 } 841 }
841 return functionsThatMightBePassedToApply.contains(element); 842 return functionsThatMightBePassedToApply.contains(element);
842 } 843 }
843 844
844 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; 845 bool get hasClosedWorldAssumption => !compiler.options.hasIncrementalSupport;
845 } 846 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/typechecker.dart ('k') | pkg/dart2js_incremental/lib/caching_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698