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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2916863003: Implement library access restrictions and privacy. (Closed)
Patch Set: Created 3 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 fasta.body_builder; 5 library fasta.body_builder;
6 6
7 import '../fasta_codes.dart' 7 import '../fasta_codes.dart'
8 show FastaMessage, codeExpectedButGot, codeExpectedFunctionBody; 8 show FastaMessage, codeExpectedButGot, codeExpectedFunctionBody;
9 9
10 import '../parser/parser.dart' show FormalParameterType, MemberKind, optional; 10 import '../parser/parser.dart' show FormalParameterType, MemberKind, optional;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 import '../modifier.dart' show Modifier, constMask, finalMask; 59 import '../modifier.dart' show Modifier, constMask, finalMask;
60 60
61 import 'redirecting_factory_body.dart' show getRedirectionTarget; 61 import 'redirecting_factory_body.dart' show getRedirectionTarget;
62 62
63 import 'kernel_builder.dart'; 63 import 'kernel_builder.dart';
64 64
65 import '../names.dart'; 65 import '../names.dart';
66 66
67 class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { 67 class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
68 @override
68 final KernelLibraryBuilder library; 69 final KernelLibraryBuilder library;
69 70
70 final MemberBuilder member; 71 final MemberBuilder member;
71 72
72 final KernelClassBuilder classBuilder; 73 final KernelClassBuilder classBuilder;
73 74
74 final ClassHierarchy hierarchy; 75 final ClassHierarchy hierarchy;
75 76
76 final CoreTypes coreTypes; 77 final CoreTypes coreTypes;
77 78
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after
2035 return; 2036 return;
2036 } 2037 }
2037 2038
2038 if (typeArguments != null) { 2039 if (typeArguments != null) {
2039 assert(arguments.types.isEmpty); 2040 assert(arguments.types.isEmpty);
2040 KernelArguments.setExplicitArgumentTypes(arguments, typeArguments); 2041 KernelArguments.setExplicitArgumentTypes(arguments, typeArguments);
2041 } 2042 }
2042 2043
2043 String errorName; 2044 String errorName;
2044 if (type is ClassBuilder) { 2045 if (type is ClassBuilder) {
2045 Builder b = type.findConstructorOrFactory(name, token.charOffset, uri); 2046 Builder b =
2047 type.findConstructorOrFactory(name, token.charOffset, uri, library);
2046 Member target; 2048 Member target;
2047 Member initialTarget; 2049 Member initialTarget;
2048 if (b == null) { 2050 if (b == null) {
2049 // Not found. Reported below. 2051 // Not found. Reported below.
2050 } else if (b.isConstructor) { 2052 } else if (b.isConstructor) {
2051 initialTarget = b.target; 2053 initialTarget = b.target;
2052 if (type.isAbstract) { 2054 if (type.isAbstract) {
2053 push(evaluateArgumentsBefore( 2055 push(evaluateArgumentsBefore(
2054 arguments, 2056 arguments,
2055 buildAbstractClassInstantiationError( 2057 buildAbstractClassInstantiationError(
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
3275 if (starToken == null) { 3277 if (starToken == null) {
3276 return AsyncMarker.Async; 3278 return AsyncMarker.Async;
3277 } else { 3279 } else {
3278 assert(identical(starToken.stringValue, "*")); 3280 assert(identical(starToken.stringValue, "*"));
3279 return AsyncMarker.AsyncStar; 3281 return AsyncMarker.AsyncStar;
3280 } 3282 }
3281 } else { 3283 } else {
3282 return internalError("Unknown async modifier: $asyncToken"); 3284 return internalError("Unknown async modifier: $asyncToken");
3283 } 3285 }
3284 } 3286 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698