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

Side by Side Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1372433003: Remove CompilationUnit name requirement (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/analyzer/test/src/context/context_test.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analyzer.src.context.context; 5 library analyzer.src.context.context;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/instrumentation/instrumentation.dart'; 10 import 'package:analyzer/instrumentation/instrumentation.dart';
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 Source unitSource, LibraryElement library) { 1192 Source unitSource, LibraryElement library) {
1193 if (library == null) { 1193 if (library == null) {
1194 return null; 1194 return null;
1195 } 1195 }
1196 return resolveCompilationUnit2(unitSource, library.source); 1196 return resolveCompilationUnit2(unitSource, library.source);
1197 } 1197 }
1198 1198
1199 @override 1199 @override
1200 CompilationUnit resolveCompilationUnit2( 1200 CompilationUnit resolveCompilationUnit2(
1201 Source unitSource, Source librarySource) { 1201 Source unitSource, Source librarySource) {
1202 if (!AnalysisEngine.isDartFileName(unitSource.shortName) ||
1203 !AnalysisEngine.isDartFileName(librarySource.shortName)) {
1204 return null;
1205 }
1206 return computeResult( 1202 return computeResult(
1207 new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT); 1203 new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT);
1208 } 1204 }
1209 1205
1210 @override 1206 @override
1211 @deprecated 1207 @deprecated
1212 ht.HtmlUnit resolveHtmlUnit(Source htmlSource) { 1208 ht.HtmlUnit resolveHtmlUnit(Source htmlSource) {
1213 // TODO(brianwilkerson) Remove this method after switching to the new task 1209 // TODO(brianwilkerson) Remove this method after switching to the new task
1214 // model. 1210 // model.
1215 throw new UnimplementedError('Not supported in the new task model'); 1211 throw new UnimplementedError('Not supported in the new task model');
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
2112 new PendingFuture<T>(_context, target, computeValue); 2108 new PendingFuture<T>(_context, target, computeValue);
2113 if (!pendingFuture.evaluate(entry)) { 2109 if (!pendingFuture.evaluate(entry)) {
2114 _context._pendingFutureTargets 2110 _context._pendingFutureTargets
2115 .putIfAbsent(target, () => <PendingFuture>[]) 2111 .putIfAbsent(target, () => <PendingFuture>[])
2116 .add(pendingFuture); 2112 .add(pendingFuture);
2117 scheduleComputation(); 2113 scheduleComputation();
2118 } 2114 }
2119 return pendingFuture.future; 2115 return pendingFuture.future;
2120 } 2116 }
2121 } 2117 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698