| 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 |
| 448 FunctionType computeFunctionType(Element element, |
| 449 FunctionSignature signature) { |
| 450 return withCurrentElement(element, |
| 451 () => resolver.computeFunctionType(element, signature)); |
| 452 } |
| 453 |
| 443 Constant compileVariable(VariableElement element) { | 454 Constant compileVariable(VariableElement element) { |
| 444 return withCurrentElement(element, () { | 455 return withCurrentElement(element, () { |
| 445 return constantHandler.compileVariable(element); | 456 return constantHandler.compileVariable(element); |
| 446 }); | 457 }); |
| 447 } | 458 } |
| 448 | 459 |
| 449 reportWarning(Node node, var message) { | 460 reportWarning(Node node, var message) { |
| 450 if (message is TypeWarning) { | 461 if (message is TypeWarning) { |
| 451 // TODO(ahe): Don't supress these warning when the type checker | 462 // TODO(ahe): Don't supress these warning when the type checker |
| 452 // is more complete. | 463 // 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 | 594 // invariant that endOffset > beginOffset, but for EOF the |
| 584 // charoffset of the next token may be [beginOffset]. This can | 595 // charoffset of the next token may be [beginOffset]. This can |
| 585 // also happen for synthetized tokens that are produced during | 596 // also happen for synthetized tokens that are produced during |
| 586 // error handling. | 597 // error handling. |
| 587 final endOffset = | 598 final endOffset = |
| 588 Math.max((end.next !== null) ? end.next.charOffset : 0, beginOffset + 1); | 599 Math.max((end.next !== null) ? end.next.charOffset : 0, beginOffset + 1); |
| 589 assert(endOffset > beginOffset); | 600 assert(endOffset > beginOffset); |
| 590 return f(beginOffset, endOffset); | 601 return f(beginOffset, endOffset); |
| 591 } | 602 } |
| 592 } | 603 } |
| OLD | NEW |