| OLD | NEW |
| 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:math" as math; | 10 import "dart:math" as math; |
| (...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1056 | 1056 |
| 1057 @override | 1057 @override |
| 1058 AnalysisOptions get analysisOptions => _options; | 1058 AnalysisOptions get analysisOptions => _options; |
| 1059 | 1059 |
| 1060 @override | 1060 @override |
| 1061 void set analysisOptions(AnalysisOptions options) { | 1061 void set analysisOptions(AnalysisOptions options) { |
| 1062 bool needsRecompute = | 1062 bool needsRecompute = |
| 1063 this._options.analyzeAngular != options.analyzeAngular || | 1063 this._options.analyzeAngular != options.analyzeAngular || |
| 1064 this._options.analyzeFunctionBodies != options.analyzeFunctionBodies || | 1064 this._options.analyzeFunctionBodies != options.analyzeFunctionBodies || |
| 1065 this._options.generateSdkErrors != options.generateSdkErrors || | 1065 this._options.generateSdkErrors != options.generateSdkErrors || |
| 1066 this._options.enableAsync != options.enableAsync || | |
| 1067 this._options.enableDeferredLoading != options.enableDeferredLoading || | 1066 this._options.enableDeferredLoading != options.enableDeferredLoading || |
| 1068 this._options.enableEnum != options.enableEnum || | 1067 this._options.enableEnum != options.enableEnum || |
| 1069 this._options.dart2jsHint != options.dart2jsHint || | 1068 this._options.dart2jsHint != options.dart2jsHint || |
| 1070 (this._options.hint && !options.hint) || | 1069 (this._options.hint && !options.hint) || |
| 1071 this._options.preserveComments != options.preserveComments; | 1070 this._options.preserveComments != options.preserveComments; |
| 1072 int cacheSize = options.cacheSize; | 1071 int cacheSize = options.cacheSize; |
| 1073 if (this._options.cacheSize != cacheSize) { | 1072 if (this._options.cacheSize != cacheSize) { |
| 1074 this._options.cacheSize = cacheSize; | 1073 this._options.cacheSize = cacheSize; |
| 1075 //cache.setMaxCacheSize(cacheSize); | 1074 //cache.setMaxCacheSize(cacheSize); |
| 1076 _privatePartition.maxCacheSize = cacheSize; | 1075 _privatePartition.maxCacheSize = cacheSize; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1088 0, | 1087 0, |
| 1089 newPriorityOrder, | 1088 newPriorityOrder, |
| 1090 0, | 1089 0, |
| 1091 maxPriorityOrderSize); | 1090 maxPriorityOrderSize); |
| 1092 _priorityOrder = newPriorityOrder; | 1091 _priorityOrder = newPriorityOrder; |
| 1093 } | 1092 } |
| 1094 } | 1093 } |
| 1095 this._options.analyzeAngular = options.analyzeAngular; | 1094 this._options.analyzeAngular = options.analyzeAngular; |
| 1096 this._options.analyzeFunctionBodies = options.analyzeFunctionBodies; | 1095 this._options.analyzeFunctionBodies = options.analyzeFunctionBodies; |
| 1097 this._options.generateSdkErrors = options.generateSdkErrors; | 1096 this._options.generateSdkErrors = options.generateSdkErrors; |
| 1098 this._options.enableAsync = options.enableAsync; | |
| 1099 this._options.enableDeferredLoading = options.enableDeferredLoading; | 1097 this._options.enableDeferredLoading = options.enableDeferredLoading; |
| 1100 this._options.enableEnum = options.enableEnum; | 1098 this._options.enableEnum = options.enableEnum; |
| 1101 this._options.dart2jsHint = options.dart2jsHint; | 1099 this._options.dart2jsHint = options.dart2jsHint; |
| 1102 this._options.hint = options.hint; | 1100 this._options.hint = options.hint; |
| 1103 this._options.incremental = options.incremental; | 1101 this._options.incremental = options.incremental; |
| 1104 this._options.incrementalApi = options.incrementalApi; | 1102 this._options.incrementalApi = options.incrementalApi; |
| 1105 this._options.preserveComments = options.preserveComments; | 1103 this._options.preserveComments = options.preserveComments; |
| 1106 _generateSdkErrors = options.generateSdkErrors; | 1104 _generateSdkErrors = options.generateSdkErrors; |
| 1107 if (needsRecompute) { | 1105 if (needsRecompute) { |
| 1108 _invalidateAllLocalResolutionInformation(false); | 1106 _invalidateAllLocalResolutionInformation(false); |
| (...skipping 5377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6486 | 6484 |
| 6487 /** | 6485 /** |
| 6488 * Return `true` if analysis is to generate dart2js related hint results. | 6486 * Return `true` if analysis is to generate dart2js related hint results. |
| 6489 * | 6487 * |
| 6490 * @return `true` if analysis is to generate dart2js related hint results | 6488 * @return `true` if analysis is to generate dart2js related hint results |
| 6491 */ | 6489 */ |
| 6492 bool get dart2jsHint; | 6490 bool get dart2jsHint; |
| 6493 | 6491 |
| 6494 /** | 6492 /** |
| 6495 * Return `true` if analysis is to include the new async support. | 6493 * Return `true` if analysis is to include the new async support. |
| 6496 * | |
| 6497 * @return `true` if analysis is to include the new async support | |
| 6498 */ | 6494 */ |
| 6495 @deprecated |
| 6499 bool get enableAsync; | 6496 bool get enableAsync; |
| 6500 | 6497 |
| 6501 /** | 6498 /** |
| 6502 * Return `true` if analysis is to include the new deferred loading support. | 6499 * Return `true` if analysis is to include the new deferred loading support. |
| 6503 * | 6500 * |
| 6504 * @return `true` if analysis is to include the new deferred loading support | 6501 * @return `true` if analysis is to include the new deferred loading support |
| 6505 */ | 6502 */ |
| 6506 bool get enableDeferredLoading; | 6503 bool get enableDeferredLoading; |
| 6507 | 6504 |
| 6508 /** | 6505 /** |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6553 * Instances of the class `AnalysisOptions` represent a set of analysis options
used to | 6550 * Instances of the class `AnalysisOptions` represent a set of analysis options
used to |
| 6554 * control the behavior of an analysis context. | 6551 * control the behavior of an analysis context. |
| 6555 */ | 6552 */ |
| 6556 class AnalysisOptionsImpl implements AnalysisOptions { | 6553 class AnalysisOptionsImpl implements AnalysisOptions { |
| 6557 /** | 6554 /** |
| 6558 * The maximum number of sources for which data should be kept in the cache. | 6555 * The maximum number of sources for which data should be kept in the cache. |
| 6559 */ | 6556 */ |
| 6560 static int DEFAULT_CACHE_SIZE = 64; | 6557 static int DEFAULT_CACHE_SIZE = 64; |
| 6561 | 6558 |
| 6562 /** | 6559 /** |
| 6563 * The default value for enabling async support. | |
| 6564 */ | |
| 6565 static bool DEFAULT_ENABLE_ASYNC = false; | |
| 6566 | |
| 6567 /** | |
| 6568 * The default value for enabling deferred loading. | 6560 * The default value for enabling deferred loading. |
| 6569 */ | 6561 */ |
| 6570 static bool DEFAULT_ENABLE_DEFERRED_LOADING = true; | 6562 static bool DEFAULT_ENABLE_DEFERRED_LOADING = true; |
| 6571 | 6563 |
| 6572 /** | 6564 /** |
| 6573 * The default value for enabling enum support. | 6565 * The default value for enabling enum support. |
| 6574 */ | 6566 */ |
| 6575 static bool DEFAULT_ENABLE_ENUM = false; | 6567 static bool DEFAULT_ENABLE_ENUM = false; |
| 6576 | 6568 |
| 6577 /** | 6569 /** |
| (...skipping 14 matching lines...) Expand all Loading... |
| 6592 /** | 6584 /** |
| 6593 * The maximum number of sources for which AST structures should be kept in th
e cache. | 6585 * The maximum number of sources for which AST structures should be kept in th
e cache. |
| 6594 */ | 6586 */ |
| 6595 int cacheSize = DEFAULT_CACHE_SIZE; | 6587 int cacheSize = DEFAULT_CACHE_SIZE; |
| 6596 | 6588 |
| 6597 /** | 6589 /** |
| 6598 * A flag indicating whether analysis is to generate dart2js related hint resu
lts. | 6590 * A flag indicating whether analysis is to generate dart2js related hint resu
lts. |
| 6599 */ | 6591 */ |
| 6600 bool dart2jsHint = true; | 6592 bool dart2jsHint = true; |
| 6601 | 6593 |
| 6602 /** | 6594 @deprecated |
| 6603 * A flag indicating whether analysis is to enable async support. | 6595 @override |
| 6604 */ | 6596 bool get enableAsync => true; |
| 6605 bool enableAsync = DEFAULT_ENABLE_ASYNC; | 6597 |
| 6598 @deprecated |
| 6599 void set enableAsync(bool enable) { |
| 6600 // Async support cannot be disabled |
| 6601 } |
| 6606 | 6602 |
| 6607 /** | 6603 /** |
| 6608 * A flag indicating whether analysis is to enable deferred loading. | 6604 * A flag indicating whether analysis is to enable deferred loading. |
| 6609 */ | 6605 */ |
| 6610 bool enableDeferredLoading = DEFAULT_ENABLE_DEFERRED_LOADING; | 6606 bool enableDeferredLoading = DEFAULT_ENABLE_DEFERRED_LOADING; |
| 6611 | 6607 |
| 6612 /** | 6608 /** |
| 6613 * A flag indicating whether analysis is to enable enum support. | 6609 * A flag indicating whether analysis is to enable enum support. |
| 6614 */ | 6610 */ |
| 6615 bool enableEnum = DEFAULT_ENABLE_ENUM; | 6611 bool enableEnum = DEFAULT_ENABLE_ENUM; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6652 * given set of analysis options. | 6648 * given set of analysis options. |
| 6653 * | 6649 * |
| 6654 * @param options the analysis options whose values are being copied | 6650 * @param options the analysis options whose values are being copied |
| 6655 */ | 6651 */ |
| 6656 AnalysisOptionsImpl.con1(AnalysisOptions options) { | 6652 AnalysisOptionsImpl.con1(AnalysisOptions options) { |
| 6657 analyzeAngular = options.analyzeAngular; | 6653 analyzeAngular = options.analyzeAngular; |
| 6658 analyzeFunctionBodies = options.analyzeFunctionBodies; | 6654 analyzeFunctionBodies = options.analyzeFunctionBodies; |
| 6659 analyzePolymer = options.analyzePolymer; | 6655 analyzePolymer = options.analyzePolymer; |
| 6660 cacheSize = options.cacheSize; | 6656 cacheSize = options.cacheSize; |
| 6661 dart2jsHint = options.dart2jsHint; | 6657 dart2jsHint = options.dart2jsHint; |
| 6662 enableAsync = options.enableAsync; | |
| 6663 enableDeferredLoading = options.enableDeferredLoading; | 6658 enableDeferredLoading = options.enableDeferredLoading; |
| 6664 enableEnum = options.enableEnum; | 6659 enableEnum = options.enableEnum; |
| 6665 _generateSdkErrors = options.generateSdkErrors; | 6660 _generateSdkErrors = options.generateSdkErrors; |
| 6666 hint = options.hint; | 6661 hint = options.hint; |
| 6667 incremental = options.incremental; | 6662 incremental = options.incremental; |
| 6668 incrementalApi = options.incrementalApi; | 6663 incrementalApi = options.incrementalApi; |
| 6669 preserveComments = options.preserveComments; | 6664 preserveComments = options.preserveComments; |
| 6670 } | 6665 } |
| 6671 | 6666 |
| 6672 @override | 6667 @override |
| (...skipping 4650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11323 // | 11318 // |
| 11324 // Then parse the token stream. | 11319 // Then parse the token stream. |
| 11325 // | 11320 // |
| 11326 TimeCounter_TimeCounterHandle timeCounterParse = | 11321 TimeCounter_TimeCounterHandle timeCounterParse = |
| 11327 PerformanceStatistics.parse.start(); | 11322 PerformanceStatistics.parse.start(); |
| 11328 try { | 11323 try { |
| 11329 RecordingErrorListener errorListener = new RecordingErrorListener(); | 11324 RecordingErrorListener errorListener = new RecordingErrorListener(); |
| 11330 Parser parser = new Parser(source, errorListener); | 11325 Parser parser = new Parser(source, errorListener); |
| 11331 AnalysisOptions options = context.analysisOptions; | 11326 AnalysisOptions options = context.analysisOptions; |
| 11332 parser.parseFunctionBodies = options.analyzeFunctionBodies; | 11327 parser.parseFunctionBodies = options.analyzeFunctionBodies; |
| 11333 parser.parseAsync = options.enableAsync; | |
| 11334 parser.parseDeferredLibraries = options.enableDeferredLoading; | 11328 parser.parseDeferredLibraries = options.enableDeferredLoading; |
| 11335 parser.parseEnum = options.enableEnum; | 11329 parser.parseEnum = options.enableEnum; |
| 11336 _unit = parser.parseCompilationUnit(_tokenStream); | 11330 _unit = parser.parseCompilationUnit(_tokenStream); |
| 11337 _unit.lineInfo = lineInfo; | 11331 _unit.lineInfo = lineInfo; |
| 11338 AnalysisContext analysisContext = context; | 11332 AnalysisContext analysisContext = context; |
| 11339 for (Directive directive in _unit.directives) { | 11333 for (Directive directive in _unit.directives) { |
| 11340 if (directive is PartOfDirective) { | 11334 if (directive is PartOfDirective) { |
| 11341 _containsPartOfDirective = true; | 11335 _containsPartOfDirective = true; |
| 11342 } else { | 11336 } else { |
| 11343 _containsNonPartOfDirective = true; | 11337 _containsNonPartOfDirective = true; |
| (...skipping 3083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14427 | 14421 |
| 14428 @override | 14422 @override |
| 14429 Object visitPolymerTagDartElement(PolymerTagDartElement element) { | 14423 Object visitPolymerTagDartElement(PolymerTagDartElement element) { |
| 14430 if (element.name == PolymerHtmlUnitBuilder_this._elementName) { | 14424 if (element.name == PolymerHtmlUnitBuilder_this._elementName) { |
| 14431 throw new PolymerHtmlUnitBuilder_FoundTagDartElementError( | 14425 throw new PolymerHtmlUnitBuilder_FoundTagDartElementError( |
| 14432 element as PolymerTagDartElementImpl); | 14426 element as PolymerTagDartElementImpl); |
| 14433 } | 14427 } |
| 14434 return null; | 14428 return null; |
| 14435 } | 14429 } |
| 14436 } | 14430 } |
| OLD | NEW |