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

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

Issue 2411883003: Add SdkPatcher and implement top-level function / getter / setter patching. (Closed)
Patch Set: tweaks Created 4 years, 2 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 analyzer.src.generated.sdk2; 5 library analyzer.src.generated.sdk2;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io' as io; 9 import 'dart:io' as io;
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 InternalAnalysisContext _analysisContext; 59 InternalAnalysisContext _analysisContext;
60 60
61 /** 61 /**
62 * The mapping from Dart URI's to the corresponding sources. 62 * The mapping from Dart URI's to the corresponding sources.
63 */ 63 */
64 Map<String, Source> _uriToSourceMap = new HashMap<String, Source>(); 64 Map<String, Source> _uriToSourceMap = new HashMap<String, Source>();
65 65
66 PackageBundle _sdkBundle; 66 PackageBundle _sdkBundle;
67 67
68 /** 68 /**
69 * Return the analysis options for this SDK analysis context.
70 */
71 AnalysisOptions get analysisOptions => _analysisOptions;
72
73 /**
69 * Set the [options] for this SDK analysis context. Throw [StateError] if the 74 * Set the [options] for this SDK analysis context. Throw [StateError] if the
70 * context has been already created. 75 * context has been already created.
71 */ 76 */
72 void set analysisOptions(AnalysisOptions options) { 77 void set analysisOptions(AnalysisOptions options) {
73 if (_analysisContext != null) { 78 if (_analysisContext != null) {
74 throw new StateError( 79 throw new StateError(
75 'Analysis options cannot be changed after context creation.'); 80 'Analysis options cannot be changed after context creation.');
76 } 81 }
77 _analysisOptions = options; 82 _analysisOptions = options;
78 } 83 }
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 SdkLibrariesReader_LibraryBuilder libraryBuilder = 883 SdkLibrariesReader_LibraryBuilder libraryBuilder =
879 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths); 884 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths);
880 // If any syntactic errors were found then don't try to visit the AST 885 // If any syntactic errors were found then don't try to visit the AST
881 // structure. 886 // structure.
882 if (!errorListener.errorReported) { 887 if (!errorListener.errorReported) {
883 unit.accept(libraryBuilder); 888 unit.accept(libraryBuilder);
884 } 889 }
885 return libraryBuilder.librariesMap; 890 return libraryBuilder.librariesMap;
886 } 891 }
887 } 892 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/sdk/patch.dart ('k') | pkg/analyzer/test/src/dart/sdk/patch_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698