OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 /// Computes measurements about sends in a function. | 5 /// Computes measurements about sends in a function. |
6 library compiler.src.info.send_info; | 6 library compiler.src.info.send_info; |
7 | 7 |
8 import 'package:dart2js_info/src/measurements.dart'; | 8 import 'package:dart2js_info/src/measurements.dart'; |
9 import 'package:dart2js_info/src/util.dart' show | 9 import 'package:dart2js_info/src/util.dart' show |
10 recursiveDiagnosticString; | 10 recursiveDiagnosticString; |
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2218 SendSet node, ConstantExpression constant, Node rhs, T arg) { | 2218 SendSet node, ConstantExpression constant, Node rhs, T arg) { |
2219 handleNSMError(node); | 2219 handleNSMError(node); |
2220 } | 2220 } |
2221 | 2221 |
2222 void visitDynamicTypeLiteralSetIfNull( | 2222 void visitDynamicTypeLiteralSetIfNull( |
2223 SendSet node, ConstantExpression constant, Node rhs, T arg) { | 2223 SendSet node, ConstantExpression constant, Node rhs, T arg) { |
2224 handleStatic(node); | 2224 handleStatic(node); |
2225 handleNSMError(node); | 2225 handleNSMError(node); |
2226 } | 2226 } |
2227 | 2227 |
| 2228 @override |
| 2229 errorInvalidIndexSetIfNull(SendSet node, ErroneousElement error, Node index, |
| 2230 Node rhs, T arg) { |
| 2231 handleNoSend(node); |
| 2232 } |
| 2233 |
| 2234 @override |
| 2235 visitIndexSetIfNull(SendSet node, Node receiver, Node index, Node rhs, |
| 2236 T arg) { |
| 2237 handleIndex(node); // t1 = receiver[index] |
| 2238 handleIndex(node); // receiver[index] = t2 |
| 2239 } |
| 2240 |
| 2241 @override |
| 2242 visitSuperIndexSetIfNull(SendSet node, MethodElement getter, |
| 2243 MethodElement setter, Node index, Node rhs, T arg) { |
| 2244 handleSuper(node); // t1 = super[index] |
| 2245 handleSuper(node); // super[index] = t2 |
| 2246 } |
| 2247 |
| 2248 @override |
| 2249 visitUnresolvedSuperGetterIndexSetIfNull(Send node, Element element, |
| 2250 MethodElement setter, Node index, Node rhs, T arg) { |
| 2251 handleNSMSuper(node, element.enclosingClass); |
| 2252 handleNSMSuper(node, element.enclosingClass); |
| 2253 } |
| 2254 |
| 2255 @override |
| 2256 visitUnresolvedSuperIndexSetIfNull(Send node, Element element, Node index, |
| 2257 Node rhs, T arg) { |
| 2258 handleNSMSuper(node, element.enclosingClass); |
| 2259 handleNSMSuper(node, element.enclosingClass); |
| 2260 } |
| 2261 |
| 2262 @override |
| 2263 visitUnresolvedSuperSetterIndexSetIfNull(Send node, MethodElement getter, |
| 2264 Element element, Node index, Node rhs, T arg) { |
| 2265 handleSuper(node); // t1 = super[index] |
| 2266 handleNSMSuper(node, element.enclosingClass); |
| 2267 } |
| 2268 |
2228 void visitIfNull(Send node, Node left, Node right, T arg) { | 2269 void visitIfNull(Send node, Node left, Node right, T arg) { |
2229 handleNoSend(node); | 2270 handleNoSend(node); |
2230 } | 2271 } |
2231 | 2272 |
2232 void visitIs(Send node, Node expression, DartType type, T arg) { | 2273 void visitIs(Send node, Node expression, DartType type, T arg) { |
2233 handleNoSend(node); | 2274 handleNoSend(node); |
2234 } | 2275 } |
2235 | 2276 |
2236 void visitIsNot(Send node, Node expression, DartType type, T arg) { | 2277 void visitIsNot(Send node, Node expression, DartType type, T arg) { |
2237 handleNoSend(node); | 2278 handleNoSend(node); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2380 @override | 2421 @override |
2381 R visitClosureFieldElement(ClosureFieldElement e, A arg) { | 2422 R visitClosureFieldElement(ClosureFieldElement e, A arg) { |
2382 return visitVariableElement(e, arg); | 2423 return visitVariableElement(e, arg); |
2383 } | 2424 } |
2384 } | 2425 } |
2385 | 2426 |
2386 // TODO(sigmund): get rid of debug messages. | 2427 // TODO(sigmund): get rid of debug messages. |
2387 _debug(String message) { | 2428 _debug(String message) { |
2388 print('[33mdebug:[0m $message'); | 2429 print('[33mdebug:[0m $message'); |
2389 } | 2430 } |
OLD | NEW |