Chromium Code Reviews| 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 | 5 |
| 6 /** | 6 /** |
| 7 * If true, print a warning for each method that was resolved, but not | 7 * If true, print a warning for each method that was resolved, but not |
| 8 * compiled. | 8 * compiled. |
| 9 */ | 9 */ |
| 10 const bool REPORT_EXCESS_RESOLUTION = false; | 10 const bool REPORT_EXCESS_RESOLUTION = false; |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 726 if (phase == PHASE_COMPILING) { | 726 if (phase == PHASE_COMPILING) { |
| 727 log('Compiled ${codegenWorld.generatedCode.length} methods.'); | 727 log('Compiled ${codegenWorld.generatedCode.length} methods.'); |
| 728 } else { | 728 } else { |
| 729 log('Recompiled ${world.recompilationCandidates.processed} methods.'); | 729 log('Recompiled ${world.recompilationCandidates.processed} methods.'); |
| 730 } | 730 } |
| 731 progress.reset(); | 731 progress.reset(); |
| 732 } | 732 } |
| 733 backend.codegen(work); | 733 backend.codegen(work); |
| 734 } | 734 } |
| 735 | 735 |
| 736 DartType resolveTypeAnnotation(Element element, TypeAnnotation annotation) { | 736 DartType resolveTypeAnnotation(Element element, |
|
ahe
2012/09/13 11:37:16
I would rather have two methods:
resolveTypeAnnot
ngeoffray
2012/09/13 11:45:59
Done.
| |
| 737 return resolver.resolveTypeAnnotation(element, annotation); | 737 TypeAnnotation annotation, |
| 738 {bool isVoidAllowed: false}) { | |
| 739 return resolver.resolveTypeAnnotation( | |
| 740 element, annotation, isVoidAllowed: isVoidAllowed); | |
| 738 } | 741 } |
| 739 | 742 |
| 740 FunctionSignature resolveSignature(FunctionElement element) { | 743 FunctionSignature resolveSignature(FunctionElement element) { |
| 741 return withCurrentElement(element, | 744 return withCurrentElement(element, |
| 742 () => resolver.resolveSignature(element)); | 745 () => resolver.resolveSignature(element)); |
| 743 } | 746 } |
| 744 | 747 |
| 745 FunctionSignature resolveFunctionExpression(Element element, | 748 FunctionSignature resolveFunctionExpression(Element element, |
| 746 FunctionExpression node) { | 749 FunctionExpression node) { |
| 747 return withCurrentElement(element, | 750 return withCurrentElement(element, |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 938 final endOffset = end.charOffset + end.slowCharCount; | 941 final endOffset = end.charOffset + end.slowCharCount; |
| 939 | 942 |
| 940 // [begin] and [end] might be the same for the same empty token. This | 943 // [begin] and [end] might be the same for the same empty token. This |
| 941 // happens for instance when scanning '$$'. | 944 // happens for instance when scanning '$$'. |
| 942 assert(endOffset >= beginOffset); | 945 assert(endOffset >= beginOffset); |
| 943 return f(beginOffset, endOffset); | 946 return f(beginOffset, endOffset); |
| 944 } | 947 } |
| 945 | 948 |
| 946 String toString() => 'SourceSpan($uri, $begin, $end)'; | 949 String toString() => 'SourceSpan($uri, $begin, $end)'; |
| 947 } | 950 } |
| OLD | NEW |