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

Side by Side Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 1212683002: AST changes necessary for generic method support (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine; 8 library engine;
9 9
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 6098 matching lines...) Expand 10 before | Expand all | Expand 10 after
6109 @deprecated // Always true 6109 @deprecated // Always true
6110 bool get enableDeferredLoading; 6110 bool get enableDeferredLoading;
6111 6111
6112 /** 6112 /**
6113 * Return `true` if analysis is to include the new enum support. 6113 * Return `true` if analysis is to include the new enum support.
6114 */ 6114 */
6115 @deprecated // Always true 6115 @deprecated // Always true
6116 bool get enableEnum; 6116 bool get enableEnum;
6117 6117
6118 /** 6118 /**
6119 * Return `true` to enable generic methods (DEP 22).
6120 */
6121 bool get enableGenericMethods => null;
6122
6123 /**
6119 * Return `true` to enable null-aware operators (DEP 9). 6124 * Return `true` to enable null-aware operators (DEP 9).
6120 */ 6125 */
6121 bool get enableNullAwareOperators; 6126 bool get enableNullAwareOperators;
6122 6127
6123 /** 6128 /**
6124 * Return `true` to strictly follow the specification when generating 6129 * Return `true` to strictly follow the specification when generating
6125 * warnings on "call" methods (fixes dartbug.com/21938). 6130 * warnings on "call" methods (fixes dartbug.com/21938).
6126 */ 6131 */
6127 bool get enableStrictCallChecks; 6132 bool get enableStrictCallChecks;
6128 6133
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
6207 */ 6212 */
6208 int cacheSize = DEFAULT_CACHE_SIZE; 6213 int cacheSize = DEFAULT_CACHE_SIZE;
6209 6214
6210 /** 6215 /**
6211 * A flag indicating whether analysis is to generate dart2js related hint 6216 * A flag indicating whether analysis is to generate dart2js related hint
6212 * results. 6217 * results.
6213 */ 6218 */
6214 bool dart2jsHint = true; 6219 bool dart2jsHint = true;
6215 6220
6216 /** 6221 /**
6222 * A flag indicating whether generic methods are to be supported (DEP 22).
6223 */
6224 bool enableGenericMethods = false;
6225
6226 /**
6217 * A flag indicating whether null-aware operators should be parsed (DEP 9). 6227 * A flag indicating whether null-aware operators should be parsed (DEP 9).
6218 */ 6228 */
6219 bool enableNullAwareOperators = false; 6229 bool enableNullAwareOperators = false;
6220 6230
6221 /** 6231 /**
6222 * A flag indicating whether analysis is to strictly follow the specification 6232 * A flag indicating whether analysis is to strictly follow the specification
6223 * when generating warnings on "call" methods (fixes dartbug.com/21938). 6233 * when generating warnings on "call" methods (fixes dartbug.com/21938).
6224 */ 6234 */
6225 bool enableStrictCallChecks = false; 6235 bool enableStrictCallChecks = false;
6226 6236
(...skipping 3326 matching lines...) Expand 10 before | Expand all | Expand 10 after
9553 void internalPerform() { 9563 void internalPerform() {
9554 // 9564 //
9555 // Then parse the token stream. 9565 // Then parse the token stream.
9556 // 9566 //
9557 PerformanceStatistics.parse.makeCurrentWhile(() { 9567 PerformanceStatistics.parse.makeCurrentWhile(() {
9558 RecordingErrorListener errorListener = new RecordingErrorListener(); 9568 RecordingErrorListener errorListener = new RecordingErrorListener();
9559 Parser parser = new Parser(source, errorListener); 9569 Parser parser = new Parser(source, errorListener);
9560 AnalysisOptions options = context.analysisOptions; 9570 AnalysisOptions options = context.analysisOptions;
9561 parser.parseFunctionBodies = 9571 parser.parseFunctionBodies =
9562 options.analyzeFunctionBodiesPredicate(source); 9572 options.analyzeFunctionBodiesPredicate(source);
9573 parser.parseGenericMethods = options.enableGenericMethods;
9563 _unit = parser.parseCompilationUnit(_tokenStream); 9574 _unit = parser.parseCompilationUnit(_tokenStream);
9564 _unit.lineInfo = lineInfo; 9575 _unit.lineInfo = lineInfo;
9565 AnalysisContext analysisContext = context; 9576 AnalysisContext analysisContext = context;
9566 for (Directive directive in _unit.directives) { 9577 for (Directive directive in _unit.directives) {
9567 if (directive is PartOfDirective) { 9578 if (directive is PartOfDirective) {
9568 _containsPartOfDirective = true; 9579 _containsPartOfDirective = true;
9569 } else { 9580 } else {
9570 _containsNonPartOfDirective = true; 9581 _containsNonPartOfDirective = true;
9571 if (directive is UriBasedDirective) { 9582 if (directive is UriBasedDirective) {
9572 Source referencedSource = resolveDirective( 9583 Source referencedSource = resolveDirective(
(...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after
11851 PendingFuture pendingFuture = 11862 PendingFuture pendingFuture =
11852 new PendingFuture<T>(_context, source, computeValue); 11863 new PendingFuture<T>(_context, source, computeValue);
11853 if (!pendingFuture.evaluate(sourceEntry)) { 11864 if (!pendingFuture.evaluate(sourceEntry)) {
11854 _context._pendingFutureSources 11865 _context._pendingFutureSources
11855 .putIfAbsent(source, () => <PendingFuture>[]) 11866 .putIfAbsent(source, () => <PendingFuture>[])
11856 .add(pendingFuture); 11867 .add(pendingFuture);
11857 } 11868 }
11858 return pendingFuture.future; 11869 return pendingFuture.future;
11859 } 11870 }
11860 } 11871 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698