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

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

Issue 1376863004: Avoid eager enqueueing from resolution (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update minimal_resolution_test. Created 5 years, 2 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/backend_api.dart' show 9 import 'common/backend_api.dart' show
10 Backend; 10 Backend;
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 } 651 }
652 652
653 void registerCannotThrow(Element element) { 653 void registerCannotThrow(Element element) {
654 elementsThatCannotThrow.add(element); 654 elementsThatCannotThrow.add(element);
655 } 655 }
656 656
657 bool getCannotThrow(Element element) { 657 bool getCannotThrow(Element element) {
658 return elementsThatCannotThrow.contains(element); 658 return elementsThatCannotThrow.contains(element);
659 } 659 }
660 660
661 void registerImplicitSuperCall(Registry registry,
662 FunctionElement superConstructor) {
663 registry.registerDependency(superConstructor);
664 }
665
666 void registerMightBePassedToApply(Element element) { 661 void registerMightBePassedToApply(Element element) {
667 functionsThatMightBePassedToApply.add(element); 662 functionsThatMightBePassedToApply.add(element);
668 } 663 }
669 664
670 bool getMightBePassedToApply(Element element) { 665 bool getMightBePassedToApply(Element element) {
671 // We have to check whether the element we look at was created after 666 // We have to check whether the element we look at was created after
672 // type inference ran. This is currently only the case for the call 667 // type inference ran. This is currently only the case for the call
673 // method of function classes that were generated for function 668 // method of function classes that were generated for function
674 // expressions. In such a case, we have to look at the original 669 // expressions. In such a case, we have to look at the original
675 // function expressions's element. 670 // function expressions's element.
676 // TODO(herhut): Generate classes for function expressions earlier. 671 // TODO(herhut): Generate classes for function expressions earlier.
677 if (element is SynthesizedCallMethodElementX) { 672 if (element is SynthesizedCallMethodElementX) {
678 return getMightBePassedToApply(element.expression); 673 return getMightBePassedToApply(element.expression);
679 } 674 }
680 return functionsThatMightBePassedToApply.contains(element); 675 return functionsThatMightBePassedToApply.contains(element);
681 } 676 }
682 677
683 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; 678 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport;
684 } 679 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698