| OLD | NEW |
| 1 library dart2js.unsugar_cps; | 1 library dart2js.unsugar_cps; |
| 2 | 2 |
| 3 import '../../cps_ir/cps_ir_nodes.dart'; | 3 import '../../cps_ir/cps_ir_nodes.dart'; |
| 4 | 4 |
| 5 import '../../cps_ir/optimizers.dart' show ParentVisitor; | 5 import '../../cps_ir/optimizers.dart' show ParentVisitor; |
| 6 import '../../constants/values.dart'; | 6 import '../../constants/values.dart'; |
| 7 import '../../elements/elements.dart'; | 7 import '../../elements/elements.dart'; |
| 8 import '../../io/source_information.dart'; | 8 import '../../io/source_information.dart'; |
| 9 import '../../js_backend/codegen/glue.dart'; | 9 import '../../js_backend/codegen/glue.dart'; |
| 10 import '../../universe/universe.dart' show Selector; | 10 import '../../universe/universe.dart' show Selector; |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 LetCont contBinding = node.parent; | 243 LetCont contBinding = node.parent; |
| 244 newReceiver = new Interceptor(receiver, node.sourceInformation) | 244 newReceiver = new Interceptor(receiver, node.sourceInformation) |
| 245 ..interceptedClasses.addAll(_glue.getInterceptedClassesOn(selector)); | 245 ..interceptedClasses.addAll(_glue.getInterceptedClassesOn(selector)); |
| 246 if (receiver.hint != null) { | 246 if (receiver.hint != null) { |
| 247 newReceiver.hint = new InterceptorEntity(receiver.hint); | 247 newReceiver.hint = new InterceptorEntity(receiver.hint); |
| 248 } | 248 } |
| 249 insertLetPrim(newReceiver, contBinding); | 249 insertLetPrim(newReceiver, contBinding); |
| 250 } | 250 } |
| 251 node.arguments.insert(0, node.receiver); | 251 node.arguments.insert(0, node.receiver); |
| 252 node.receiver = new Reference<Primitive>(newReceiver); | 252 node.receiver = new Reference<Primitive>(newReceiver); |
| 253 node.receiverIsIntercepted = true; |
| 253 } | 254 } |
| 254 | 255 |
| 255 processInvokeMethodDirectly(InvokeMethodDirectly node) { | 256 processInvokeMethodDirectly(InvokeMethodDirectly node) { |
| 256 if (!_glue.isInterceptedMethod(node.target)) return; | 257 if (!_glue.isInterceptedMethod(node.target)) return; |
| 257 | 258 |
| 258 Selector selector = node.selector; | 259 Selector selector = node.selector; |
| 259 Primitive receiver = node.receiver.definition; | 260 Primitive receiver = node.receiver.definition; |
| 260 Primitive newReceiver; | 261 Primitive newReceiver; |
| 261 | 262 |
| 262 if (receiver == explicitReceiverParameter) { | 263 if (receiver == explicitReceiverParameter) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 274 insertLetPrim(newReceiver, contBinding); | 275 insertLetPrim(newReceiver, contBinding); |
| 275 } | 276 } |
| 276 node.arguments.insert(0, node.receiver); | 277 node.arguments.insert(0, node.receiver); |
| 277 node.receiver = new Reference<Primitive>(newReceiver); | 278 node.receiver = new Reference<Primitive>(newReceiver); |
| 278 } | 279 } |
| 279 | 280 |
| 280 processInterceptor(Interceptor node) { | 281 processInterceptor(Interceptor node) { |
| 281 _glue.registerSpecializedGetInterceptor(node.interceptedClasses); | 282 _glue.registerSpecializedGetInterceptor(node.interceptedClasses); |
| 282 } | 283 } |
| 283 } | 284 } |
| OLD | NEW |