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

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

Issue 1172693003: Move computeType to TypedElement and TypeDeclarationElement. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 part of dart2js; 5 part of dart2js;
6 6
7 typedef ItemCompilationContext ItemCompilationContextCreator(); 7 typedef ItemCompilationContext ItemCompilationContextCreator();
8 8
9 class EnqueueTask extends CompilerTask { 9 class EnqueueTask extends CompilerTask {
10 final ResolutionEnqueuer resolution; 10 final ResolutionEnqueuer resolution;
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 } 606 }
607 607
608 void registerCallMethodWithFreeTypeVariables( 608 void registerCallMethodWithFreeTypeVariables(
609 Element element, 609 Element element,
610 Registry registry) { 610 Registry registry) {
611 compiler.backend.registerCallMethodWithFreeTypeVariables( 611 compiler.backend.registerCallMethodWithFreeTypeVariables(
612 element, this, registry); 612 element, this, registry);
613 universe.callMethodsWithFreeTypeVariables.add(element); 613 universe.callMethodsWithFreeTypeVariables.add(element);
614 } 614 }
615 615
616 void registerClosurizedMember(Element element, Registry registry) { 616 void registerClosurizedMember(TypedElement element, Registry registry) {
617 assert(element.isInstanceMember); 617 assert(element.isInstanceMember);
618 registerClosureIfFreeTypeVariables(element, registry); 618 registerClosureIfFreeTypeVariables(element, registry);
619 compiler.backend.registerBoundClosure(this); 619 compiler.backend.registerBoundClosure(this);
620 universe.closurizedMembers.add(element); 620 universe.closurizedMembers.add(element);
621 } 621 }
622 622
623 void registerClosureIfFreeTypeVariables(Element element, Registry registry) { 623 void registerClosureIfFreeTypeVariables(TypedElement element,
624 Registry registry) {
624 if (element.computeType(compiler).containsTypeVariables) { 625 if (element.computeType(compiler).containsTypeVariables) {
625 compiler.backend.registerClosureWithFreeTypeVariables( 626 compiler.backend.registerClosureWithFreeTypeVariables(
626 element, this, registry); 627 element, this, registry);
627 universe.closuresWithFreeTypeVariables.add(element); 628 universe.closuresWithFreeTypeVariables.add(element);
628 } 629 }
629 } 630 }
630 631
631 void registerClosure(LocalFunctionElement element, Registry registry) { 632 void registerClosure(LocalFunctionElement element, Registry registry) {
632 universe.allClosures.add(element); 633 universe.allClosures.add(element);
633 registerClosureIfFreeTypeVariables(element, registry); 634 registerClosureIfFreeTypeVariables(element, registry);
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 void processWorkItem(void f(WorkItem work), WorkItem work) { 945 void processWorkItem(void f(WorkItem work), WorkItem work) {
945 f(work); 946 f(work);
946 } 947 }
947 } 948 }
948 949
949 void removeFromSet(Map<String, Set<Element>> map, Element element) { 950 void removeFromSet(Map<String, Set<Element>> map, Element element) {
950 Set<Element> set = map[element.name]; 951 Set<Element> set = map[element.name];
951 if (set == null) return; 952 if (set == null) return;
952 set.remove(element); 953 set.remove(element);
953 } 954 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/js_emitter/js_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698