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

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

Issue 2000663002: Handle resolvedAst for forwarding constructors and callType on unnamed mixin applications. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix test. Created 4 years, 7 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.typechecker; 5 library dart2js.typechecker;
6 6
7 import 'common/names.dart' show Identifiers; 7 import 'common/names.dart' show Identifiers;
8 import 'common/resolution.dart' show Resolution; 8 import 'common/resolution.dart' show Resolution;
9 import 'common/tasks.dart' show CompilerTask; 9 import 'common/tasks.dart' show CompilerTask;
10 import 'common.dart'; 10 import 'common.dart';
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 if (receiverType.treatAsDynamic) { 709 if (receiverType.treatAsDynamic) {
710 return const DynamicAccess(); 710 return const DynamicAccess();
711 } 711 }
712 712
713 Name memberName = new Name(name, currentLibrary, 713 Name memberName = new Name(name, currentLibrary,
714 isSetter: memberKind == MemberKind.SETTER); 714 isSetter: memberKind == MemberKind.SETTER);
715 715
716 // Lookup the class or interface member [name] in [interface]. 716 // Lookup the class or interface member [name] in [interface].
717 MemberSignature lookupMemberSignature(Name name, InterfaceType interface) { 717 MemberSignature lookupMemberSignature(Name name, InterfaceType interface) {
718 MembersCreator.computeClassMembersByName( 718 MembersCreator.computeClassMembersByName(
719 compiler, interface.element, name.text); 719 resolution, interface.element, name.text);
720 return lookupClassMember || analyzingInitializer 720 return lookupClassMember || analyzingInitializer
721 ? interface.lookupClassMember(name) 721 ? interface.lookupClassMember(name)
722 : interface.lookupInterfaceMember(name); 722 : interface.lookupInterfaceMember(name);
723 } 723 }
724 724
725 // Compute the access of [name] on [type]. This function takes the special 725 // Compute the access of [name] on [type]. This function takes the special
726 // 'call' method into account. 726 // 'call' method into account.
727 ElementAccess getAccess( 727 ElementAccess getAccess(
728 Name name, DartType unaliasedBound, InterfaceType interface) { 728 Name name, DartType unaliasedBound, InterfaceType interface) {
729 MemberSignature member = lookupMemberSignature(memberName, interface); 729 MemberSignature member = lookupMemberSignature(memberName, interface);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 MessageKind.PRIVATE_ACCESS, 792 MessageKind.PRIVATE_ACCESS,
793 { 793 {
794 'name': name, 794 'name': name,
795 'libraryName': privateName.library.libraryOrScriptName 795 'libraryName': privateName.library.libraryOrScriptName
796 }, 796 },
797 isHint: isHint); 797 isHint: isHint);
798 foundPrivateMember = true; 798 foundPrivateMember = true;
799 } 799 }
800 } 800 }
801 // TODO(johnniwinther): Avoid computation of all class members. 801 // TODO(johnniwinther): Avoid computation of all class members.
802 MembersCreator.computeAllClassMembers(compiler, interface.element); 802 MembersCreator.computeAllClassMembers(resolution, interface.element);
803 if (lookupClassMember) { 803 if (lookupClassMember) {
804 interface.element.forEachClassMember(findPrivateMember); 804 interface.element.forEachClassMember(findPrivateMember);
805 } else { 805 } else {
806 interface.element.forEachInterfaceMember(findPrivateMember); 806 interface.element.forEachInterfaceMember(findPrivateMember);
807 } 807 }
808 } 808 }
809 if (!foundPrivateMember) { 809 if (!foundPrivateMember) {
810 switch (memberKind) { 810 switch (memberKind) {
811 case MemberKind.METHOD: 811 case MemberKind.METHOD:
812 reportMessage(node, MessageKind.UNDEFINED_METHOD, 812 reportMessage(node, MessageKind.UNDEFINED_METHOD,
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 2018
2019 visitTypedef(Typedef node) { 2019 visitTypedef(Typedef node) {
2020 // Do not typecheck [Typedef] nodes. 2020 // Do not typecheck [Typedef] nodes.
2021 } 2021 }
2022 2022
2023 visitNode(Node node) { 2023 visitNode(Node node) {
2024 reporter.internalError(node, 2024 reporter.internalError(node,
2025 'Unexpected node ${node.getObjectDescription()} in the type checker.'); 2025 'Unexpected node ${node.getObjectDescription()} in the type checker.');
2026 } 2026 }
2027 } 2027 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/serialization/task.dart ('k') | tests/compiler/dart2js/diagnostic_reporter_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698