| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 abstract List<CompilerTask> get tasks; | 79 abstract List<CompilerTask> get tasks; |
| 80 | 80 |
| 81 // TODO(ahe,karlklose): rename this? | 81 // TODO(ahe,karlklose): rename this? |
| 82 void dumpInferredTypes() {} | 82 void dumpInferredTypes() {} |
| 83 | 83 |
| 84 ItemCompilationContext createItemCompilationContext() { | 84 ItemCompilationContext createItemCompilationContext() { |
| 85 return new ItemCompilationContext(); | 85 return new ItemCompilationContext(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 SourceString getCheckedModeHelper(DartType type) => null; | 88 SourceString getCheckedModeHelper(DartType type) => null; |
| 89 |
| 90 abstract Element getInterceptor(Selector selector); |
| 89 } | 91 } |
| 90 | 92 |
| 91 abstract class Compiler implements DiagnosticListener { | 93 abstract class Compiler implements DiagnosticListener { |
| 92 final Map<String, LibraryElement> libraries; | 94 final Map<String, LibraryElement> libraries; |
| 93 int nextFreeClassId = 0; | 95 int nextFreeClassId = 0; |
| 94 World world; | 96 World world; |
| 95 String assembledCode; | 97 String assembledCode; |
| 96 Types types; | 98 Types types; |
| 97 | 99 |
| 98 final bool enableMinification; | 100 final bool enableMinification; |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 * information in the generated error message. | 852 * information in the generated error message. |
| 851 */ | 853 */ |
| 852 bool invariant(Spannable spannable, var condition, {String message: null}) { | 854 bool invariant(Spannable spannable, var condition, {String message: null}) { |
| 853 // TODO(johnniwinther): Use [spannable] and [message] to provide better | 855 // TODO(johnniwinther): Use [spannable] and [message] to provide better |
| 854 // information on assertion errors. | 856 // information on assertion errors. |
| 855 if (condition is Function){ | 857 if (condition is Function){ |
| 856 condition = condition(); | 858 condition = condition(); |
| 857 } | 859 } |
| 858 return spannable != null && condition; | 860 return spannable != null && condition; |
| 859 } | 861 } |
| OLD | NEW |