| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
| 9 * compiled. | 9 * compiled. |
| 10 */ | 10 */ |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 // TODO(ahe,karlklose): rename this? | 123 // TODO(ahe,karlklose): rename this? |
| 124 void dumpInferredTypes() {} | 124 void dumpInferredTypes() {} |
| 125 | 125 |
| 126 ItemCompilationContext createItemCompilationContext() { | 126 ItemCompilationContext createItemCompilationContext() { |
| 127 return new ItemCompilationContext(); | 127 return new ItemCompilationContext(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 SourceString getCheckedModeHelper(DartType type) => null; | 130 SourceString getCheckedModeHelper(DartType type) => null; |
| 131 void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) {} | 131 void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) {} |
| 132 ClassElement get listImplementation => compiler.listClass; |
| 132 } | 133 } |
| 133 | 134 |
| 134 /** | 135 /** |
| 135 * Key class used in [TokenMap] in which the hash code for a token is based | 136 * Key class used in [TokenMap] in which the hash code for a token is based |
| 136 * on the [charOffset]. | 137 * on the [charOffset]. |
| 137 */ | 138 */ |
| 138 class TokenKey { | 139 class TokenKey { |
| 139 final Token token; | 140 final Token token; |
| 140 TokenKey(this.token); | 141 TokenKey(this.token); |
| 141 int get hashCode => token.charOffset; | 142 int get hashCode => token.charOffset; |
| (...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 // TODO(johnniwinther): Use [spannable] and [message] to provide better | 1081 // TODO(johnniwinther): Use [spannable] and [message] to provide better |
| 1081 // information on assertion errors. | 1082 // information on assertion errors. |
| 1082 if (condition is Function){ | 1083 if (condition is Function){ |
| 1083 condition = condition(); | 1084 condition = condition(); |
| 1084 } | 1085 } |
| 1085 if (spannable == null || !condition) { | 1086 if (spannable == null || !condition) { |
| 1086 throw new SpannableAssertionFailure(spannable, message); | 1087 throw new SpannableAssertionFailure(spannable, message); |
| 1087 } | 1088 } |
| 1088 return true; | 1089 return true; |
| 1089 } | 1090 } |
| OLD | NEW |