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

Side by Side Diff: pkg/analyzer/lib/src/summary/summary_sdk.dart

Issue 1814723002: Prepare for turning on SDK summaries in Analysis Server. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Set 'true' as value. Created 4 years, 9 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 | « pkg/analysis_server/lib/src/server/driver.dart ('k') | no next file » | 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.summary.summary_sdk; 5 library analyzer.src.summary.summary_sdk;
6 6
7 import 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/dart/element/type.dart'; 8 import 'package:analyzer/dart/element/type.dart';
9 import 'package:analyzer/src/context/cache.dart' show CacheEntry; 9 import 'package:analyzer/src/context/cache.dart' show CacheEntry;
10 import 'package:analyzer/src/context/context.dart'; 10 import 'package:analyzer/src/context/context.dart';
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 return false; 87 return false;
88 } else { 88 } else {
89 // throw new UnimplementedError('$result of $target'); 89 // throw new UnimplementedError('$result of $target');
90 } 90 }
91 } 91 }
92 if (target is LibrarySpecificUnit) { 92 if (target is LibrarySpecificUnit) {
93 if (target.library == null || !target.library.isInSystemLibrary) { 93 if (target.library == null || !target.library.isInSystemLibrary) {
94 return false; 94 return false;
95 } 95 }
96 if (result == CREATED_RESOLVED_UNIT1 ||
97 result == CREATED_RESOLVED_UNIT2 ||
98 result == CREATED_RESOLVED_UNIT3 ||
99 result == CREATED_RESOLVED_UNIT4 ||
100 result == CREATED_RESOLVED_UNIT5 ||
101 result == CREATED_RESOLVED_UNIT6 ||
102 result == CREATED_RESOLVED_UNIT7 ||
103 result == CREATED_RESOLVED_UNIT8 ||
104 result == CREATED_RESOLVED_UNIT9) {
105 entry.setValue(result, true, TargetedResult.EMPTY_LIST);
106 return true;
107 }
96 if (result == COMPILATION_UNIT_ELEMENT) { 108 if (result == COMPILATION_UNIT_ELEMENT) {
97 String libraryUri = target.library.uri.toString(); 109 String libraryUri = target.library.uri.toString();
98 String unitUri = target.unit.uri.toString(); 110 String unitUri = target.unit.uri.toString();
99 CompilationUnitElement unit = resynthesizer.getElement( 111 CompilationUnitElement unit = resynthesizer.getElement(
100 new ElementLocationImpl.con3(<String>[libraryUri, unitUri])); 112 new ElementLocationImpl.con3(<String>[libraryUri, unitUri]));
101 if (unit != null) { 113 if (unit != null) {
102 entry.setValue(result, unit, TargetedResult.EMPTY_LIST); 114 entry.setValue(result, unit, TargetedResult.EMPTY_LIST);
103 return true; 115 return true;
104 } 116 }
105 } 117 }
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 * throw a [StateError] if there is no class with the given name. 418 * throw a [StateError] if there is no class with the given name.
407 */ 419 */
408 InterfaceType _getType(LibraryElement library, String name) { 420 InterfaceType _getType(LibraryElement library, String name) {
409 Element element = library.getType(name); 421 Element element = library.getType(name);
410 if (element == null) { 422 if (element == null) {
411 throw new StateError("No definition of type $name"); 423 throw new StateError("No definition of type $name");
412 } 424 }
413 return (element as ClassElement).type; 425 return (element as ClassElement).type;
414 } 426 }
415 } 427 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/server/driver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698