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 3285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3296 new AnalysisException( | 3296 new AnalysisException( |
3297 "Entry has VALID state for RESOLVED_UNIT but null value for ${unit
Source.fullName} in ${librarySource.fullName}"), | 3297 "Entry has VALID state for RESOLVED_UNIT but null value for ${unit
Source.fullName} in ${librarySource.fullName}"), |
3298 null); | 3298 null); |
3299 AnalysisEngine.instance.logger.logInformation( | 3299 AnalysisEngine.instance.logger.logInformation( |
3300 exception.toString(), | 3300 exception.toString(), |
3301 exception); | 3301 exception); |
3302 unitEntry.recordResolutionError(exception); | 3302 unitEntry.recordResolutionError(exception); |
3303 return new AnalysisContextImpl_TaskData(null, false); | 3303 return new AnalysisContextImpl_TaskData(null, false); |
3304 } | 3304 } |
3305 LibraryElement libraryElement = libraryEntry.getValue(DartEntry.ELEMENT); | 3305 LibraryElement libraryElement = libraryEntry.getValue(DartEntry.ELEMENT); |
3306 unitEntry.setStateInLibrary( | |
3307 DartEntry.VERIFICATION_ERRORS, | |
3308 librarySource, | |
3309 CacheState.IN_PROCESS); | |
3310 return new AnalysisContextImpl_TaskData( | 3306 return new AnalysisContextImpl_TaskData( |
3311 new GenerateDartErrorsTask(this, unitSource, unit, libraryElement), | 3307 new GenerateDartErrorsTask(this, unitSource, unit, libraryElement), |
3312 false); | 3308 false); |
3313 } | 3309 } |
3314 | 3310 |
3315 /** | 3311 /** |
3316 * Create a [GenerateDartHintsTask] for the given source, marking the hints as
being | 3312 * Create a [GenerateDartHintsTask] for the given source, marking the hints as
being |
3317 * in-process. | 3313 * in-process. |
3318 * | 3314 * |
3319 * @param source the source whose content is to be verified | 3315 * @param source the source whose content is to be verified |
(...skipping 20 matching lines...) Expand all Loading... |
3340 return _createResolveDartLibraryTask(librarySource, libraryEntry); | 3336 return _createResolveDartLibraryTask(librarySource, libraryEntry); |
3341 } | 3337 } |
3342 for (int i = 0; i < parts.length; i++) { | 3338 for (int i = 0; i < parts.length; i++) { |
3343 units[i + 1] = _getResolvedUnit(parts[i], librarySource); | 3339 units[i + 1] = _getResolvedUnit(parts[i], librarySource); |
3344 if (units[i + 1] == null) { | 3340 if (units[i + 1] == null) { |
3345 // TODO(brianwilkerson) We should return a ResolveDartUnitTask | 3341 // TODO(brianwilkerson) We should return a ResolveDartUnitTask |
3346 // (unless there are multiple ASTs that need to be resolved). | 3342 // (unless there are multiple ASTs that need to be resolved). |
3347 return _createResolveDartLibraryTask(librarySource, libraryEntry); | 3343 return _createResolveDartLibraryTask(librarySource, libraryEntry); |
3348 } | 3344 } |
3349 } | 3345 } |
3350 dartEntry.setStateInLibrary( | |
3351 DartEntry.HINTS, | |
3352 librarySource, | |
3353 CacheState.IN_PROCESS); | |
3354 return new AnalysisContextImpl_TaskData( | 3346 return new AnalysisContextImpl_TaskData( |
3355 new GenerateDartHintsTask(this, units, libraryElement), | 3347 new GenerateDartHintsTask(this, units, libraryElement), |
3356 false); | 3348 false); |
3357 } | 3349 } |
3358 | 3350 |
3359 /** | 3351 /** |
3360 * Create a [GenerateDartLintsTask] for the given source, marking the lints as | 3352 * Create a [GenerateDartLintsTask] for the given source, marking the lints as |
3361 * being in-process. | 3353 * being in-process. |
3362 * | 3354 * |
3363 * @param source the source whose content is to be verified | 3355 * @param source the source whose content is to be verified |
(...skipping 20 matching lines...) Expand all Loading... |
3384 return _createResolveDartLibraryTask(librarySource, libraryEntry); | 3376 return _createResolveDartLibraryTask(librarySource, libraryEntry); |
3385 } | 3377 } |
3386 for (int i = 0; i < parts.length; i++) { | 3378 for (int i = 0; i < parts.length; i++) { |
3387 units[i + 1] = _getResolvedUnit(parts[i], librarySource); | 3379 units[i + 1] = _getResolvedUnit(parts[i], librarySource); |
3388 if (units[i + 1] == null) { | 3380 if (units[i + 1] == null) { |
3389 // TODO(brianwilkerson) We should return a ResolveDartUnitTask | 3381 // TODO(brianwilkerson) We should return a ResolveDartUnitTask |
3390 // (unless there are multiple ASTs that need to be resolved). | 3382 // (unless there are multiple ASTs that need to be resolved). |
3391 return _createResolveDartLibraryTask(librarySource, libraryEntry); | 3383 return _createResolveDartLibraryTask(librarySource, libraryEntry); |
3392 } | 3384 } |
3393 } | 3385 } |
3394 dartEntry.setStateInLibrary( | |
3395 DartEntry.LINTS, | |
3396 librarySource, | |
3397 CacheState.IN_PROCESS); | |
3398 //TODO(pquitslund): revisit if we need all units or whether one will do | 3386 //TODO(pquitslund): revisit if we need all units or whether one will do |
3399 return new AnalysisContextImpl_TaskData( | 3387 return new AnalysisContextImpl_TaskData( |
3400 new GenerateDartLintsTask(this, units, libraryElement), | 3388 new GenerateDartLintsTask(this, units, libraryElement), |
3401 false); | 3389 false); |
3402 } | 3390 } |
3403 | 3391 |
3404 /** | 3392 /** |
3405 * Create a [GetContentTask] for the given source, marking the content as bein
g in-process. | 3393 * Create a [GetContentTask] for the given source, marking the content as bein
g in-process. |
3406 * | 3394 * |
3407 * @param source the source whose content is to be accessed | 3395 * @param source the source whose content is to be accessed |
3408 * @param sourceEntry the entry for the source | 3396 * @param sourceEntry the entry for the source |
3409 * @return task data representing the created task | 3397 * @return task data representing the created task |
3410 */ | 3398 */ |
3411 AnalysisContextImpl_TaskData _createGetContentTask(Source source, | 3399 AnalysisContextImpl_TaskData _createGetContentTask(Source source, |
3412 SourceEntry sourceEntry) { | 3400 SourceEntry sourceEntry) { |
3413 sourceEntry.setState(SourceEntry.CONTENT, CacheState.IN_PROCESS); | |
3414 return new AnalysisContextImpl_TaskData( | 3401 return new AnalysisContextImpl_TaskData( |
3415 new GetContentTask(this, source), | 3402 new GetContentTask(this, source), |
3416 false); | 3403 false); |
3417 } | 3404 } |
3418 | 3405 |
3419 /** | 3406 /** |
3420 * Create a [ParseDartTask] for the given [source]. | 3407 * Create a [ParseDartTask] for the given [source]. |
3421 */ | 3408 */ |
3422 AnalysisContextImpl_TaskData _createParseDartTask(Source source, | 3409 AnalysisContextImpl_TaskData _createParseDartTask(Source source, |
3423 DartEntry dartEntry) { | 3410 DartEntry dartEntry) { |
3424 if (dartEntry.getState(DartEntry.TOKEN_STREAM) != CacheState.VALID || | 3411 if (dartEntry.getState(DartEntry.TOKEN_STREAM) != CacheState.VALID || |
3425 dartEntry.getState(SourceEntry.LINE_INFO) != CacheState.VALID) { | 3412 dartEntry.getState(SourceEntry.LINE_INFO) != CacheState.VALID) { |
3426 return _createScanDartTask(source, dartEntry); | 3413 return _createScanDartTask(source, dartEntry); |
3427 } | 3414 } |
3428 Token tokenStream = dartEntry.getValue(DartEntry.TOKEN_STREAM); | 3415 Token tokenStream = dartEntry.getValue(DartEntry.TOKEN_STREAM); |
3429 dartEntry.setState(DartEntry.TOKEN_STREAM, CacheState.FLUSHED); | 3416 dartEntry.setState(DartEntry.TOKEN_STREAM, CacheState.FLUSHED); |
3430 dartEntry.setState(DartEntry.PARSE_ERRORS, CacheState.IN_PROCESS); | |
3431 return new AnalysisContextImpl_TaskData( | 3417 return new AnalysisContextImpl_TaskData( |
3432 new ParseDartTask( | 3418 new ParseDartTask( |
3433 this, | 3419 this, |
3434 source, | 3420 source, |
3435 tokenStream, | 3421 tokenStream, |
3436 dartEntry.getValue(SourceEntry.LINE_INFO)), | 3422 dartEntry.getValue(SourceEntry.LINE_INFO)), |
3437 false); | 3423 false); |
3438 } | 3424 } |
3439 | 3425 |
3440 /** | 3426 /** |
3441 * Create a [ParseHtmlTask] for the given [source]. | 3427 * Create a [ParseHtmlTask] for the given [source]. |
3442 */ | 3428 */ |
3443 AnalysisContextImpl_TaskData _createParseHtmlTask(Source source, | 3429 AnalysisContextImpl_TaskData _createParseHtmlTask(Source source, |
3444 HtmlEntry htmlEntry) { | 3430 HtmlEntry htmlEntry) { |
3445 if (htmlEntry.getState(SourceEntry.CONTENT) != CacheState.VALID) { | 3431 if (htmlEntry.getState(SourceEntry.CONTENT) != CacheState.VALID) { |
3446 return _createGetContentTask(source, htmlEntry); | 3432 return _createGetContentTask(source, htmlEntry); |
3447 } | 3433 } |
3448 String content = htmlEntry.getValue(SourceEntry.CONTENT); | 3434 String content = htmlEntry.getValue(SourceEntry.CONTENT); |
3449 htmlEntry.setState(SourceEntry.CONTENT, CacheState.FLUSHED); | 3435 htmlEntry.setState(SourceEntry.CONTENT, CacheState.FLUSHED); |
3450 htmlEntry.setState(HtmlEntry.PARSE_ERRORS, CacheState.IN_PROCESS); | |
3451 return new AnalysisContextImpl_TaskData( | 3436 return new AnalysisContextImpl_TaskData( |
3452 new ParseHtmlTask(this, source, content), | 3437 new ParseHtmlTask(this, source, content), |
3453 false); | 3438 false); |
3454 } | 3439 } |
3455 | 3440 |
3456 /** | 3441 /** |
3457 * Create a [ResolveDartLibraryTask] for the given source, marking ? as being
in-process. | 3442 * Create a [ResolveDartLibraryTask] for the given source, marking ? as being
in-process. |
3458 * | 3443 * |
3459 * @param source the source whose content is to be resolved | 3444 * @param source the source whose content is to be resolved |
3460 * @param dartEntry the entry for the source | 3445 * @param dartEntry the entry for the source |
(...skipping 28 matching lines...) Expand all Loading... |
3489 * | 3474 * |
3490 * @param source the source whose content is to be resolved | 3475 * @param source the source whose content is to be resolved |
3491 * @param htmlEntry the entry for the source | 3476 * @param htmlEntry the entry for the source |
3492 * @return task data representing the created task | 3477 * @return task data representing the created task |
3493 */ | 3478 */ |
3494 AnalysisContextImpl_TaskData _createResolveHtmlTask(Source source, | 3479 AnalysisContextImpl_TaskData _createResolveHtmlTask(Source source, |
3495 HtmlEntry htmlEntry) { | 3480 HtmlEntry htmlEntry) { |
3496 if (htmlEntry.getState(HtmlEntry.PARSED_UNIT) != CacheState.VALID) { | 3481 if (htmlEntry.getState(HtmlEntry.PARSED_UNIT) != CacheState.VALID) { |
3497 return _createParseHtmlTask(source, htmlEntry); | 3482 return _createParseHtmlTask(source, htmlEntry); |
3498 } | 3483 } |
3499 htmlEntry.setState(HtmlEntry.RESOLVED_UNIT, CacheState.IN_PROCESS); | |
3500 return new AnalysisContextImpl_TaskData( | 3484 return new AnalysisContextImpl_TaskData( |
3501 new ResolveHtmlTask( | 3485 new ResolveHtmlTask( |
3502 this, | 3486 this, |
3503 source, | 3487 source, |
3504 htmlEntry.modificationTime, | 3488 htmlEntry.modificationTime, |
3505 htmlEntry.getValue(HtmlEntry.PARSED_UNIT)), | 3489 htmlEntry.getValue(HtmlEntry.PARSED_UNIT)), |
3506 false); | 3490 false); |
3507 } | 3491 } |
3508 | 3492 |
3509 /** | 3493 /** |
3510 * Create a [ScanDartTask] for the given source, marking the scan errors as be
ing | 3494 * Create a [ScanDartTask] for the given source, marking the scan errors as be
ing |
3511 * in-process. | 3495 * in-process. |
3512 * | 3496 * |
3513 * @param source the source whose content is to be scanned | 3497 * @param source the source whose content is to be scanned |
3514 * @param dartEntry the entry for the source | 3498 * @param dartEntry the entry for the source |
3515 * @return task data representing the created task | 3499 * @return task data representing the created task |
3516 */ | 3500 */ |
3517 AnalysisContextImpl_TaskData _createScanDartTask(Source source, | 3501 AnalysisContextImpl_TaskData _createScanDartTask(Source source, |
3518 DartEntry dartEntry) { | 3502 DartEntry dartEntry) { |
3519 if (dartEntry.getState(SourceEntry.CONTENT) != CacheState.VALID) { | 3503 if (dartEntry.getState(SourceEntry.CONTENT) != CacheState.VALID) { |
3520 return _createGetContentTask(source, dartEntry); | 3504 return _createGetContentTask(source, dartEntry); |
3521 } | 3505 } |
3522 String content = dartEntry.getValue(SourceEntry.CONTENT); | 3506 String content = dartEntry.getValue(SourceEntry.CONTENT); |
3523 dartEntry.setState(SourceEntry.CONTENT, CacheState.FLUSHED); | 3507 dartEntry.setState(SourceEntry.CONTENT, CacheState.FLUSHED); |
3524 dartEntry.setState(DartEntry.SCAN_ERRORS, CacheState.IN_PROCESS); | |
3525 return new AnalysisContextImpl_TaskData( | 3508 return new AnalysisContextImpl_TaskData( |
3526 new ScanDartTask(this, source, content), | 3509 new ScanDartTask(this, source, content), |
3527 false); | 3510 false); |
3528 } | 3511 } |
3529 | 3512 |
3530 /** | 3513 /** |
3531 * Create a source information object suitable for the given source. Return th
e source information | 3514 * Create a source information object suitable for the given source. Return th
e source information |
3532 * object that was created, or `null` if the source should not be tracked by t
his context. | 3515 * object that was created, or `null` if the source should not be tracked by t
his context. |
3533 * | 3516 * |
3534 * @param source the source for which an information object is being created | 3517 * @param source the source for which an information object is being created |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3955 } | 3938 } |
3956 List<Source> librariesContaining = dartEntry.containingLibraries; | 3939 List<Source> librariesContaining = dartEntry.containingLibraries; |
3957 for (Source librarySource in librariesContaining) { | 3940 for (Source librarySource in librariesContaining) { |
3958 SourceEntry librarySourceEntry = _cache.get(librarySource); | 3941 SourceEntry librarySourceEntry = _cache.get(librarySource); |
3959 if (librarySourceEntry is DartEntry) { | 3942 if (librarySourceEntry is DartEntry) { |
3960 DartEntry libraryEntry = librarySourceEntry; | 3943 DartEntry libraryEntry = librarySourceEntry; |
3961 CacheState elementState = libraryEntry.getState(DartEntry.ELEMENT); | 3944 CacheState elementState = libraryEntry.getState(DartEntry.ELEMENT); |
3962 if (elementState == CacheState.INVALID || | 3945 if (elementState == CacheState.INVALID || |
3963 (isPriority && elementState == CacheState.FLUSHED)) { | 3946 (isPriority && elementState == CacheState.FLUSHED)) { |
3964 // return createResolveDartLibraryTask(librarySource, (DartEntry) lib
raryEntry); | 3947 // return createResolveDartLibraryTask(librarySource, (DartEntry) lib
raryEntry); |
3965 libraryEntry.setState(DartEntry.ELEMENT, CacheState.IN_PROCESS); | |
3966 return new AnalysisContextImpl_TaskData( | 3948 return new AnalysisContextImpl_TaskData( |
3967 new ResolveDartLibraryTask(this, source, librarySource), | 3949 new ResolveDartLibraryTask(this, source, librarySource), |
3968 false); | 3950 false); |
3969 } | 3951 } |
3970 CacheState resolvedUnitState = | 3952 CacheState resolvedUnitState = |
3971 dartEntry.getStateInLibrary(DartEntry.RESOLVED_UNIT, librarySource
); | 3953 dartEntry.getStateInLibrary(DartEntry.RESOLVED_UNIT, librarySource
); |
3972 if (resolvedUnitState == CacheState.INVALID || | 3954 if (resolvedUnitState == CacheState.INVALID || |
3973 (isPriority && resolvedUnitState == CacheState.FLUSHED)) { | 3955 (isPriority && resolvedUnitState == CacheState.FLUSHED)) { |
3974 // | 3956 // |
3975 // The commented out lines below are an optimization that doesn't | 3957 // The commented out lines below are an optimization that doesn't |
3976 // quite work yet. The problem is that if the source was not | 3958 // quite work yet. The problem is that if the source was not |
3977 // resolved because it wasn't part of any library, then there won't | 3959 // resolved because it wasn't part of any library, then there won't |
3978 // be any elements in the element model that we can use to resolve | 3960 // be any elements in the element model that we can use to resolve |
3979 // it. | 3961 // it. |
3980 // | 3962 // |
3981 // LibraryElement libraryElement = libraryEntry.getValue(DartEntry.EL
EMENT); | 3963 // LibraryElement libraryElement = libraryEntry.getValue(DartEntry.EL
EMENT); |
3982 // if (libraryElement != null) { | 3964 // if (libraryElement != null) { |
3983 // return new ResolveDartUnitTask(this, source, libraryElement); | 3965 // return new ResolveDartUnitTask(this, source, libraryElement); |
3984 // } | 3966 // } |
3985 // Possibly replace with: | 3967 // Possibly replace with: |
3986 // return createResolveDartLibraryTask(librarySource, (DartEntry) li
braryEntry); | 3968 // return createResolveDartLibraryTask(librarySource, (DartEntry) li
braryEntry); |
3987 dartEntry.setStateInLibrary( | |
3988 DartEntry.RESOLVED_UNIT, | |
3989 librarySource, | |
3990 CacheState.IN_PROCESS); | |
3991 return new AnalysisContextImpl_TaskData( | 3969 return new AnalysisContextImpl_TaskData( |
3992 new ResolveDartLibraryTask(this, source, librarySource), | 3970 new ResolveDartLibraryTask(this, source, librarySource), |
3993 false); | 3971 false); |
3994 } | 3972 } |
3995 if (_generateSdkErrors || !source.isInSystemLibrary) { | 3973 if (_generateSdkErrors || !source.isInSystemLibrary) { |
3996 CacheState verificationErrorsState = | 3974 CacheState verificationErrorsState = |
3997 dartEntry.getStateInLibrary(DartEntry.VERIFICATION_ERRORS, libra
rySource); | 3975 dartEntry.getStateInLibrary(DartEntry.VERIFICATION_ERRORS, libra
rySource); |
3998 if (verificationErrorsState == CacheState.INVALID || | 3976 if (verificationErrorsState == CacheState.INVALID || |
3999 (isPriority && verificationErrorsState == CacheState.FLUSHED)) { | 3977 (isPriority && verificationErrorsState == CacheState.FLUSHED)) { |
4000 return _createGenerateDartErrorsTask( | 3978 return _createGenerateDartErrorsTask( |
(...skipping 3224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7225 * Return the priority of retaining the AST structure for the given source. | 7203 * Return the priority of retaining the AST structure for the given source. |
7226 * | 7204 * |
7227 * @param source the source whose AST structure is being considered for remova
l | 7205 * @param source the source whose AST structure is being considered for remova
l |
7228 * @param sourceEntry the entry representing the source | 7206 * @param sourceEntry the entry representing the source |
7229 * @return the priority of retaining the AST structure for the given source | 7207 * @return the priority of retaining the AST structure for the given source |
7230 */ | 7208 */ |
7231 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry); | 7209 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry); |
7232 } | 7210 } |
7233 | 7211 |
7234 /** | 7212 /** |
7235 * The enumeration `CacheState` defines the possible states of cached data. | 7213 * The possible states of cached data. |
7236 */ | 7214 */ |
7237 class CacheState extends Enum<CacheState> { | 7215 class CacheState extends Enum<CacheState> { |
7238 /** | 7216 /** |
7239 * The data is not in the cache and the last time an attempt was made to compu
te the data an | 7217 * The data is not in the cache and the last time an attempt was made to |
7240 * exception occurred, making it pointless to attempt. | 7218 * compute the data an exception occurred, making it pointless to attempt to |
| 7219 * compute the data again. |
7241 * | 7220 * |
7242 * Valid Transitions: | 7221 * Valid Transitions: |
7243 * * [INVALID] if a source was modified that might cause the data to be comput
able | 7222 * * [INVALID] if a source was modified that might cause the data to be |
| 7223 * computable |
7244 */ | 7224 */ |
7245 static const CacheState ERROR = const CacheState('ERROR', 0); | 7225 static const CacheState ERROR = const CacheState('ERROR', 0); |
7246 | 7226 |
7247 /** | 7227 /** |
7248 * The data is not in the cache because it was flushed from the cache in order
to control memory | 7228 * The data is not in the cache because it was flushed from the cache in order |
7249 * usage. If the data is recomputed, results do not need to be reported. | 7229 * to control memory usage. If the data is recomputed, results do not need to |
| 7230 * be reported. |
7250 * | 7231 * |
7251 * Valid Transitions: | 7232 * Valid Transitions: |
7252 * * [IN_PROCESS] if the data is being recomputed | 7233 * * [IN_PROCESS] if the data is being recomputed |
7253 * * [INVALID] if a source was modified that causes the data to need to be rec
omputed | 7234 * * [INVALID] if a source was modified that causes the data to need to be |
| 7235 * recomputed |
7254 */ | 7236 */ |
7255 static const CacheState FLUSHED = const CacheState('FLUSHED', 1); | 7237 static const CacheState FLUSHED = const CacheState('FLUSHED', 1); |
7256 | 7238 |
7257 /** | 7239 /** |
7258 * The data might or might not be in the cache but is in the process of being
recomputed. | 7240 * The data might or might not be in the cache but is in the process of being |
| 7241 * recomputed. |
7259 * | 7242 * |
7260 * Valid Transitions: | 7243 * Valid Transitions: |
7261 * * [ERROR] if an exception occurred while trying to compute the data | 7244 * * [ERROR] if an exception occurred while trying to compute the data |
7262 * * [VALID] if the data was successfully computed and stored in the cache | 7245 * * [VALID] if the data was successfully computed and stored in the cache |
7263 */ | 7246 */ |
7264 static const CacheState IN_PROCESS = const CacheState('IN_PROCESS', 2); | 7247 static const CacheState IN_PROCESS = const CacheState('IN_PROCESS', 2); |
7265 | 7248 |
7266 /** | 7249 /** |
7267 * The data is not in the cache and needs to be recomputed so that results can
be reported. | 7250 * The data is not in the cache and needs to be recomputed so that results can |
| 7251 * be reported. |
7268 * | 7252 * |
7269 * Valid Transitions: | 7253 * Valid Transitions: |
7270 * * [IN_PROCESS] if an attempt is being made to recompute the data | 7254 * * [IN_PROCESS] if an attempt is being made to recompute the data |
7271 */ | 7255 */ |
7272 static const CacheState INVALID = const CacheState('INVALID', 3); | 7256 static const CacheState INVALID = const CacheState('INVALID', 3); |
7273 | 7257 |
7274 /** | 7258 /** |
7275 * The data is in the cache and up-to-date. | 7259 * The data is in the cache and up-to-date. |
7276 * | 7260 * |
7277 * Valid Transitions: | 7261 * Valid Transitions: |
7278 * * [FLUSHED] if the data is removed in order to manage memory usage | 7262 * * [FLUSHED] if the data is removed in order to manage memory usage |
7279 * * [INVALID] if a source was modified in such a way as to invalidate the pre
vious data | 7263 * * [INVALID] if a source was modified in such a way as to invalidate the |
| 7264 * previous data |
7280 */ | 7265 */ |
7281 static const CacheState VALID = const CacheState('VALID', 4); | 7266 static const CacheState VALID = const CacheState('VALID', 4); |
7282 | 7267 |
7283 static const List<CacheState> values = const [ | 7268 static const List<CacheState> values = const [ |
7284 ERROR, | 7269 ERROR, |
7285 FLUSHED, | 7270 FLUSHED, |
7286 IN_PROCESS, | 7271 IN_PROCESS, |
7287 INVALID, | 7272 INVALID, |
7288 VALID]; | 7273 VALID]; |
7289 | 7274 |
(...skipping 5119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12409 if (element.id == _id) { | 12394 if (element.id == _id) { |
12410 result = element; | 12395 result = element; |
12411 throw new _ElementByIdFinderException(); | 12396 throw new _ElementByIdFinderException(); |
12412 } | 12397 } |
12413 super.visitElement(element); | 12398 super.visitElement(element); |
12414 } | 12399 } |
12415 } | 12400 } |
12416 | 12401 |
12417 class _ElementByIdFinderException { | 12402 class _ElementByIdFinderException { |
12418 } | 12403 } |
OLD | NEW |