Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/compiler.dart

Issue 12334070: Support runtime check of function types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix status files Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 needsRti(ClassElement cls);
130 bool methodNeedsRti(Element cls);
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, TreeElements elements) {}
162 /**
163 * Call this to register that a getter exists for a function on an
164 * instantiated generic class.
165 */
166 void registerGenericClosure(Element closure,
167 Enqueuer enqueuer, TreeElements elements) {}
168 /**
169 * Call this to register that the [:runtimeType:] property has been accessed.
170 */
171 void registerRuntimeType(Enqueuer enqueuer, TreeElements elements) {}
156 172
157 void registerRequiredType(DartType type, Element enclosingElement) {} 173 void registerRequiredType(DartType type, Element enclosingElement) {}
158 void registerClassUsingVariableExpression(ClassElement cls) {} 174 void registerClassUsingVariableExpression(ClassElement cls) {}
159 175
160 bool isNullImplementation(ClassElement cls) { 176 bool isNullImplementation(ClassElement cls) {
161 return cls == compiler.nullClass; 177 return cls == compiler.nullClass;
162 } 178 }
163 ClassElement get intImplementation => compiler.intClass; 179 ClassElement get intImplementation => compiler.intClass;
164 ClassElement get doubleImplementation => compiler.doubleClass; 180 ClassElement get doubleImplementation => compiler.doubleClass;
165 ClassElement get numImplementation => compiler.numClass; 181 ClassElement get numImplementation => compiler.numClass;
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 1403
1388 void close() {} 1404 void close() {}
1389 1405
1390 toString() => name; 1406 toString() => name;
1391 1407
1392 /// Convenience method for getting an [api.CompilerOutputProvider]. 1408 /// Convenience method for getting an [api.CompilerOutputProvider].
1393 static NullSink outputProvider(String name, String extension) { 1409 static NullSink outputProvider(String name, String extension) {
1394 return new NullSink('$name.$extension'); 1410 return new NullSink('$name.$extension');
1395 } 1411 }
1396 } 1412 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698