| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 class WorkItem { | 5 class WorkItem { |
| 6 final Element element; | 6 final Element element; |
| 7 TreeElements resolutionTree; | 7 TreeElements resolutionTree; |
| 8 bool allowSpeculativeOptimization = true; | 8 bool allowSpeculativeOptimization = true; |
| 9 List<HTypeGuard> guards = const <HTypeGuard>[]; | 9 List<HTypeGuard> guards = const <HTypeGuard>[]; |
| 10 | 10 |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 | 433 |
| 434 Type resolveTypeAnnotation(Element element, TypeAnnotation annotation) { | 434 Type resolveTypeAnnotation(Element element, TypeAnnotation annotation) { |
| 435 return resolver.resolveTypeAnnotation(element, annotation); | 435 return resolver.resolveTypeAnnotation(element, annotation); |
| 436 } | 436 } |
| 437 | 437 |
| 438 FunctionSignature resolveSignature(FunctionElement element) { | 438 FunctionSignature resolveSignature(FunctionElement element) { |
| 439 return withCurrentElement(element, | 439 return withCurrentElement(element, |
| 440 () => resolver.resolveSignature(element)); | 440 () => resolver.resolveSignature(element)); |
| 441 } | 441 } |
| 442 | 442 |
| 443 FunctionSignature resolveTypedef(TypedefElement element) { |
| 444 return withCurrentElement(element, |
| 445 () => resolver.resolveTypedef(element)); |
| 446 } |
| 447 |
| 443 Constant compileVariable(VariableElement element) { | 448 Constant compileVariable(VariableElement element) { |
| 444 return withCurrentElement(element, () { | 449 return withCurrentElement(element, () { |
| 445 return constantHandler.compileVariable(element); | 450 return constantHandler.compileVariable(element); |
| 446 }); | 451 }); |
| 447 } | 452 } |
| 448 | 453 |
| 449 reportWarning(Node node, var message) { | 454 reportWarning(Node node, var message) { |
| 450 if (message is TypeWarning) { | 455 if (message is TypeWarning) { |
| 451 // TODO(ahe): Don't supress these warning when the type checker | 456 // TODO(ahe): Don't supress these warning when the type checker |
| 452 // is more complete. | 457 // is more complete. |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 // invariant that endOffset > beginOffset, but for EOF the | 588 // invariant that endOffset > beginOffset, but for EOF the |
| 584 // charoffset of the next token may be [beginOffset]. This can | 589 // charoffset of the next token may be [beginOffset]. This can |
| 585 // also happen for synthetized tokens that are produced during | 590 // also happen for synthetized tokens that are produced during |
| 586 // error handling. | 591 // error handling. |
| 587 final endOffset = | 592 final endOffset = |
| 588 Math.max((end.next !== null) ? end.next.charOffset : 0, beginOffset + 1); | 593 Math.max((end.next !== null) ? end.next.charOffset : 0, beginOffset + 1); |
| 589 assert(endOffset > beginOffset); | 594 assert(endOffset > beginOffset); |
| 590 return f(beginOffset, endOffset); | 595 return f(beginOffset, endOffset); |
| 591 } | 596 } |
| 592 } | 597 } |
| OLD | NEW |