| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 void onResolutionComplete() {} | 120 void onResolutionComplete() {} |
| 121 | 121 |
| 122 // TODO(ahe,karlklose): rename this? | 122 // TODO(ahe,karlklose): rename this? |
| 123 void dumpInferredTypes() {} | 123 void dumpInferredTypes() {} |
| 124 | 124 |
| 125 ItemCompilationContext createItemCompilationContext() { | 125 ItemCompilationContext createItemCompilationContext() { |
| 126 return new ItemCompilationContext(); | 126 return new ItemCompilationContext(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 bool needsRti(ClassElement cls); | 129 bool classNeedsRti(ClassElement cls); |
| 130 bool methodNeedsRti(FunctionElement function); |
| 130 | 131 |
| 131 // The following methods are hooks for the backend to register its | 132 // The following methods are hooks for the backend to register its |
| 132 // helper methods. | 133 // helper methods. |
| 133 void registerInstantiatedClass(ClassElement cls, | 134 void registerInstantiatedClass(ClassElement cls, |
| 134 Enqueuer enqueuer, | 135 Enqueuer enqueuer, |
| 135 TreeElements elements) {} | 136 TreeElements elements) {} |
| 136 void registerStringInterpolation(TreeElements elements) {} | 137 void registerStringInterpolation(TreeElements elements) {} |
| 137 void registerCatchStatement(Enqueuer enqueuer, | 138 void registerCatchStatement(Enqueuer enqueuer, |
| 138 TreeElements elements) {} | 139 TreeElements elements) {} |
| 139 void registerWrapException(TreeElements elements) {} | 140 void registerWrapException(TreeElements elements) {} |
| 140 void registerThrowExpression(TreeElements elements) {} | 141 void registerThrowExpression(TreeElements elements) {} |
| 141 void registerLazyField(TreeElements elements) {} | 142 void registerLazyField(TreeElements elements) {} |
| 142 void registerTypeVariableExpression(TreeElements elements) {} | 143 void registerTypeVariableExpression(TreeElements elements) {} |
| 143 void registerTypeLiteral(TreeElements elements) {} | 144 void registerTypeLiteral(TreeElements elements) {} |
| 144 void registerStackTraceInCatch(TreeElements elements) {} | 145 void registerStackTraceInCatch(TreeElements elements) {} |
| 145 void registerIsCheck(DartType type, | 146 void registerIsCheck(DartType type, |
| 146 Enqueuer enqueuer, | 147 Enqueuer enqueuer, |
| 147 TreeElements elements) {} | 148 TreeElements elements) {} |
| 148 void registerAsCheck(DartType type, TreeElements elements) {} | 149 void registerAsCheck(DartType type, TreeElements elements) {} |
| 149 void registerThrowNoSuchMethod(TreeElements elements) {} | 150 void registerThrowNoSuchMethod(TreeElements elements) {} |
| 150 void registerThrowRuntimeError(TreeElements elements) {} | 151 void registerThrowRuntimeError(TreeElements elements) {} |
| 151 void registerAbstractClassInstantiation(TreeElements elements) {} | 152 void registerAbstractClassInstantiation(TreeElements elements) {} |
| 152 void registerFallThroughError(TreeElements elements) {} | 153 void registerFallThroughError(TreeElements elements) {} |
| 153 void registerSuperNoSuchMethod(TreeElements elements) {} | 154 void registerSuperNoSuchMethod(TreeElements elements) {} |
| 154 void registerConstantMap(TreeElements elements) {} | 155 void registerConstantMap(TreeElements elements) {} |
| 155 void registerRuntimeType(TreeElements elements) {} | 156 /** |
| 157 * Call this to register that an instantiated generic class has a call |
| 158 * method. |
| 159 */ |
| 160 void registerGenericCallMethod(Element callMethod, |
| 161 Enqueuer enqueuer, |
| 162 TreeElements elements) {} |
| 163 /** |
| 164 * Call this to register that a getter exists for a function on an |
| 165 * instantiated generic class. |
| 166 */ |
| 167 void registerGenericClosure(Element closure, |
| 168 Enqueuer enqueuer, |
| 169 TreeElements elements) {} |
| 170 /** |
| 171 * Call this to register that the [:runtimeType:] property has been accessed. |
| 172 */ |
| 173 void registerRuntimeType(Enqueuer enqueuer, TreeElements elements) {} |
| 156 | 174 |
| 157 void registerRequiredType(DartType type, Element enclosingElement) {} | 175 void registerRequiredType(DartType type, Element enclosingElement) {} |
| 158 void registerClassUsingVariableExpression(ClassElement cls) {} | 176 void registerClassUsingVariableExpression(ClassElement cls) {} |
| 159 | 177 |
| 160 bool isNullImplementation(ClassElement cls) { | 178 bool isNullImplementation(ClassElement cls) { |
| 161 return cls == compiler.nullClass; | 179 return cls == compiler.nullClass; |
| 162 } | 180 } |
| 163 ClassElement get intImplementation => compiler.intClass; | 181 ClassElement get intImplementation => compiler.intClass; |
| 164 ClassElement get doubleImplementation => compiler.doubleClass; | 182 ClassElement get doubleImplementation => compiler.doubleClass; |
| 165 ClassElement get numImplementation => compiler.numClass; | 183 ClassElement get numImplementation => compiler.numClass; |
| (...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1414 | 1432 |
| 1415 void close() {} | 1433 void close() {} |
| 1416 | 1434 |
| 1417 toString() => name; | 1435 toString() => name; |
| 1418 | 1436 |
| 1419 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1437 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1420 static NullSink outputProvider(String name, String extension) { | 1438 static NullSink outputProvider(String name, String extension) { |
| 1421 return new NullSink('$name.$extension'); | 1439 return new NullSink('$name.$extension'); |
| 1422 } | 1440 } |
| 1423 } | 1441 } |
| OLD | NEW |