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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 | 123 |
124 void onResolutionComplete() {} | 124 void onResolutionComplete() {} |
125 | 125 |
126 // TODO(ahe,karlklose): rename this? | 126 // TODO(ahe,karlklose): rename this? |
127 void dumpInferredTypes() {} | 127 void dumpInferredTypes() {} |
128 | 128 |
129 ItemCompilationContext createItemCompilationContext() { | 129 ItemCompilationContext createItemCompilationContext() { |
130 return new ItemCompilationContext(); | 130 return new ItemCompilationContext(); |
131 } | 131 } |
132 | 132 |
133 bool needsRti(ClassElement cls); | 133 bool needsRti(ClassElement cls); |
karlklose
2013/03/22 13:17:46
Should we rename this to classNeedsRti?
Johnni Winther
2013/06/21 12:19:14
Done.
| |
134 bool methodNeedsRti(Element cls); | |
karlklose
2013/03/22 13:17:46
'Element' -> 'FunctionElement'.
'cls' -> 'function
Johnni Winther
2013/06/21 12:19:14
Done.
| |
134 | 135 |
135 // The following methods are hooks for the backend to register its | 136 // The following methods are hooks for the backend to register its |
136 // helper methods. | 137 // helper methods. |
137 void registerInstantiatedClass(ClassElement cls, | 138 void registerInstantiatedClass(ClassElement cls, |
138 Enqueuer enqueuer, | 139 Enqueuer enqueuer, |
139 TreeElements elements) {} | 140 TreeElements elements) {} |
140 void registerStringInterpolation(TreeElements elements) {} | 141 void registerStringInterpolation(TreeElements elements) {} |
141 void registerCatchStatement(TreeElements elements) {} | 142 void registerCatchStatement(TreeElements elements) {} |
142 void registerThrow(TreeElements elements) {} | 143 void registerThrow(TreeElements elements) {} |
143 void registerLazyField(TreeElements elements) {} | 144 void registerLazyField(TreeElements elements) {} |
144 void registerTypeVariableExpression(TreeElements elements) {} | 145 void registerTypeVariableExpression(TreeElements elements) {} |
145 void registerTypeLiteral(TreeElements elements) {} | 146 void registerTypeLiteral(TreeElements elements) {} |
146 void registerStackTraceInCatch(TreeElements elements) {} | 147 void registerStackTraceInCatch(TreeElements elements) {} |
147 void registerIsCheck(DartType type, | 148 void registerIsCheck(DartType type, |
148 Enqueuer enqueuer, | 149 Enqueuer enqueuer, |
149 TreeElements elements) {} | 150 TreeElements elements) {} |
150 void registerAsCheck(DartType type, TreeElements elements) {} | 151 void registerAsCheck(DartType type, TreeElements elements) {} |
151 void registerThrowNoSuchMethod(TreeElements elements) {} | 152 void registerThrowNoSuchMethod(TreeElements elements) {} |
152 void registerThrowRuntimeError(TreeElements elements) {} | 153 void registerThrowRuntimeError(TreeElements elements) {} |
153 void registerAbstractClassInstantiation(TreeElements elements) {} | 154 void registerAbstractClassInstantiation(TreeElements elements) {} |
154 void registerFallThroughError(TreeElements elements) {} | 155 void registerFallThroughError(TreeElements elements) {} |
155 void registerSuperNoSuchMethod(TreeElements elements) {} | 156 void registerSuperNoSuchMethod(TreeElements elements) {} |
156 void registerConstantMap(TreeElements elements) {} | 157 void registerConstantMap(TreeElements elements) {} |
157 void registerRuntimeType(TreeElements elements) {} | 158 /** |
159 * Call this to register that an instantiated generic class has a call | |
160 * method. | |
161 */ | |
162 void registerGenericCallMethod(Element callMethod, | |
163 Enqueuer enqueuer, TreeElements elements) {} | |
karlklose
2013/03/22 13:17:46
Break line after each parameter to keep the code i
Johnni Winther
2013/06/21 12:19:14
Done.
| |
164 /** | |
165 * Call this to register that a getter exists for a function on an | |
166 * instantiated generic class. | |
167 */ | |
168 void registerGenericClosure(Element closure, | |
169 Enqueuer enqueuer, TreeElements elements) {} | |
170 /** | |
171 * Call this to register that the [:runtimeType:] property has been accessed. | |
172 */ | |
173 void registerRuntimeType(Enqueuer enqueuer, TreeElements elements) {} | |
158 | 174 |
159 void registerRequiredType(DartType type, Element enclosingElement) {} | 175 void registerRequiredType(DartType type, Element enclosingElement) {} |
160 void registerClassUsingVariableExpression(ClassElement cls) {} | 176 void registerClassUsingVariableExpression(ClassElement cls) {} |
161 | 177 |
162 bool isNullImplementation(ClassElement cls) { | 178 bool isNullImplementation(ClassElement cls) { |
163 return cls == compiler.nullClass; | 179 return cls == compiler.nullClass; |
164 } | 180 } |
165 ClassElement get intImplementation => compiler.intClass; | 181 ClassElement get intImplementation => compiler.intClass; |
166 ClassElement get doubleImplementation => compiler.doubleClass; | 182 ClassElement get doubleImplementation => compiler.doubleClass; |
167 ClassElement get numImplementation => compiler.numClass; | 183 ClassElement get numImplementation => compiler.numClass; |
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1257 | 1273 |
1258 void close() {} | 1274 void close() {} |
1259 | 1275 |
1260 toString() => name; | 1276 toString() => name; |
1261 | 1277 |
1262 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1278 /// Convenience method for getting an [api.CompilerOutputProvider]. |
1263 static NullSink outputProvider(String name, String extension) { | 1279 static NullSink outputProvider(String name, String extension) { |
1264 return new NullSink('$name.$extension'); | 1280 return new NullSink('$name.$extension'); |
1265 } | 1281 } |
1266 } | 1282 } |
OLD | NEW |