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 void onResolutionComplete() {} | 123 void onResolutionComplete() {} |
124 | 124 |
125 // TODO(ahe,karlklose): rename this? | 125 // TODO(ahe,karlklose): rename this? |
126 void dumpInferredTypes() {} | 126 void dumpInferredTypes() {} |
127 | 127 |
128 ItemCompilationContext createItemCompilationContext() { | 128 ItemCompilationContext createItemCompilationContext() { |
129 return new ItemCompilationContext(); | 129 return new ItemCompilationContext(); |
130 } | 130 } |
131 | 131 |
132 bool needsRti(ClassElement cls); | 132 bool needsRti(ClassElement cls); |
karlklose
2013/06/19 14:37:05
Should we rename it to classNeedsRti?
Johnni Winther
2013/06/21 12:19:15
Done.
| |
133 bool methodNeedsRti(Element cls); | |
133 | 134 |
134 // The following methods are hooks for the backend to register its | 135 // The following methods are hooks for the backend to register its |
135 // helper methods. | 136 // helper methods. |
136 void registerInstantiatedClass(ClassElement cls, | 137 void registerInstantiatedClass(ClassElement cls, |
137 Enqueuer enqueuer, | 138 Enqueuer enqueuer, |
138 TreeElements elements) {} | 139 TreeElements elements) {} |
139 void registerStringInterpolation(TreeElements elements) {} | 140 void registerStringInterpolation(TreeElements elements) {} |
140 void registerCatchStatement(Enqueuer enqueuer, | 141 void registerCatchStatement(Enqueuer enqueuer, |
141 TreeElements elements) {} | 142 TreeElements elements) {} |
142 void registerWrapException(TreeElements elements) {} | 143 void registerWrapException(TreeElements elements) {} |
143 void registerThrowExpression(TreeElements elements) {} | 144 void registerThrowExpression(TreeElements elements) {} |
144 void registerLazyField(TreeElements elements) {} | 145 void registerLazyField(TreeElements elements) {} |
145 void registerTypeVariableExpression(TreeElements elements) {} | 146 void registerTypeVariableExpression(TreeElements elements) {} |
146 void registerTypeLiteral(TreeElements elements) {} | 147 void registerTypeLiteral(TreeElements elements) {} |
147 void registerStackTraceInCatch(TreeElements elements) {} | 148 void registerStackTraceInCatch(TreeElements elements) {} |
148 void registerIsCheck(DartType type, | 149 void registerIsCheck(DartType type, |
149 Enqueuer enqueuer, | 150 Enqueuer enqueuer, |
150 TreeElements elements) {} | 151 TreeElements elements) {} |
151 void registerAsCheck(DartType type, TreeElements elements) {} | 152 void registerAsCheck(DartType type, TreeElements elements) {} |
152 void registerThrowNoSuchMethod(TreeElements elements) {} | 153 void registerThrowNoSuchMethod(TreeElements elements) {} |
153 void registerThrowRuntimeError(TreeElements elements) {} | 154 void registerThrowRuntimeError(TreeElements elements) {} |
154 void registerAbstractClassInstantiation(TreeElements elements) {} | 155 void registerAbstractClassInstantiation(TreeElements elements) {} |
155 void registerFallThroughError(TreeElements elements) {} | 156 void registerFallThroughError(TreeElements elements) {} |
156 void registerSuperNoSuchMethod(TreeElements elements) {} | 157 void registerSuperNoSuchMethod(TreeElements elements) {} |
157 void registerConstantMap(TreeElements elements) {} | 158 void registerConstantMap(TreeElements elements) {} |
158 void registerRuntimeType(TreeElements elements) {} | 159 /** |
160 * Call this to register that an instantiated generic class has a call | |
161 * method. | |
162 */ | |
163 void registerGenericCallMethod(Element callMethod, | |
164 Enqueuer enqueuer, TreeElements elements) {} | |
165 /** | |
166 * Call this to register that a getter exists for a function on an | |
167 * instantiated generic class. | |
168 */ | |
169 void registerGenericClosure(Element closure, | |
170 Enqueuer enqueuer, TreeElements elements) {} | |
171 /** | |
172 * Call this to register that the [:runtimeType:] property has been accessed. | |
173 */ | |
174 void registerRuntimeType(Enqueuer enqueuer, TreeElements elements) {} | |
159 | 175 |
160 void registerRequiredType(DartType type, Element enclosingElement) {} | 176 void registerRequiredType(DartType type, Element enclosingElement) {} |
161 void registerClassUsingVariableExpression(ClassElement cls) {} | 177 void registerClassUsingVariableExpression(ClassElement cls) {} |
162 | 178 |
163 bool isNullImplementation(ClassElement cls) { | 179 bool isNullImplementation(ClassElement cls) { |
164 return cls == compiler.nullClass; | 180 return cls == compiler.nullClass; |
165 } | 181 } |
166 ClassElement get intImplementation => compiler.intClass; | 182 ClassElement get intImplementation => compiler.intClass; |
167 ClassElement get doubleImplementation => compiler.doubleClass; | 183 ClassElement get doubleImplementation => compiler.doubleClass; |
168 ClassElement get numImplementation => compiler.numClass; | 184 ClassElement get numImplementation => compiler.numClass; |
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1363 | 1379 |
1364 void close() {} | 1380 void close() {} |
1365 | 1381 |
1366 toString() => name; | 1382 toString() => name; |
1367 | 1383 |
1368 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1384 /// Convenience method for getting an [api.CompilerOutputProvider]. |
1369 static NullSink outputProvider(String name, String extension) { | 1385 static NullSink outputProvider(String name, String extension) { |
1370 return new NullSink('$name.$extension'); | 1386 return new NullSink('$name.$extension'); |
1371 } | 1387 } |
1372 } | 1388 } |
OLD | NEW |