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

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

Issue 2615173002: Revert "Ensure we're looking at the correct resolved AST when initializing fields in constructors." (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import 'common.dart'; 5 import 'common.dart';
6 import 'elements/elements.dart' show LibraryElement; 6 import 'elements/elements.dart' show LibraryElement;
7 import 'util/emptyset.dart'; 7 import 'util/emptyset.dart';
8 8
9 /// API used by the library loader to translate internal SDK URIs into file 9 /// API used by the library loader to translate internal SDK URIs into file
10 /// system readable URIs. 10 /// system readable URIs.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 if (location == null) { 108 if (location == null) {
109 _reporter.reportErrorMessage(spannable, MessageKind.LIBRARY_NOT_FOUND, 109 _reporter.reportErrorMessage(spannable, MessageKind.LIBRARY_NOT_FOUND,
110 {'resolvedUri': resolvedUri}); 110 {'resolvedUri': resolvedUri});
111 return null; 111 return null;
112 } 112 }
113 113
114 if (resolvedUri.path.startsWith('_')) { 114 if (resolvedUri.path.startsWith('_')) {
115 bool allowInternalLibraryAccess = importingLibrary != null && 115 bool allowInternalLibraryAccess = importingLibrary != null &&
116 (importingLibrary.isPlatformLibrary || 116 (importingLibrary.isPlatformLibrary ||
117 importingLibrary.isPatch || 117 importingLibrary.isPatch ||
118 // The memory scheme is specifically for unit tests that use the
119 // in-memory compiler.
120 importingLibrary.canonicalUri.scheme == 'memory' ||
121 importingLibrary.canonicalUri.path 118 importingLibrary.canonicalUri.path
122 .contains('sdk/tests/compiler/dart2js_native')); 119 .contains('sdk/tests/compiler/dart2js_native'));
123 120
124 if (!allowInternalLibraryAccess) { 121 if (!allowInternalLibraryAccess) {
125 if (importingLibrary != null) { 122 if (importingLibrary != null) {
126 _reporter.reportErrorMessage( 123 _reporter.reportErrorMessage(
127 spannable, MessageKind.INTERNAL_LIBRARY_FROM, { 124 spannable, MessageKind.INTERNAL_LIBRARY_FROM, {
128 'resolvedUri': resolvedUri, 125 'resolvedUri': resolvedUri,
129 'importingUri': importingLibrary.canonicalUri 126 'importingUri': importingLibrary.canonicalUri
130 }); 127 });
(...skipping 22 matching lines...) Expand all
153 } 150 }
154 151
155 void registerDisallowedLibraryUse(Uri uri) { 152 void registerDisallowedLibraryUse(Uri uri) {
156 disallowedLibraryUris.add(uri); 153 disallowedLibraryUris.add(uri);
157 } 154 }
158 155
159 Uri lookupLibraryUri(String libraryName) { 156 Uri lookupLibraryUri(String libraryName) {
160 return _sdkLibraries[libraryName]; 157 return _sdkLibraries[libraryName];
161 } 158 }
162 } 159 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698