| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 ssa; | 5 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 6 import '../compiler.dart' show Compiler; |
| 7 import '../constants/constant_system.dart'; |
| 8 import '../constants/values.dart'; |
| 9 import '../elements/elements.dart'; |
| 10 import '../js_backend/backend_helpers.dart' show BackendHelpers; |
| 11 import '../js_backend/js_backend.dart'; |
| 12 import '../types/types.dart'; |
| 13 import '../universe/selector.dart' show Selector; |
| 14 import '../world.dart' show ClassWorld, World; |
| 15 |
| 16 import 'nodes.dart'; |
| 17 import 'optimize.dart'; |
| 6 | 18 |
| 7 /** | 19 /** |
| 8 * This phase simplifies interceptors in multiple ways: | 20 * This phase simplifies interceptors in multiple ways: |
| 9 * | 21 * |
| 10 * 1) If the interceptor is for an object whose type is known, it | 22 * 1) If the interceptor is for an object whose type is known, it |
| 11 * tries to use a constant interceptor instead. | 23 * tries to use a constant interceptor instead. |
| 12 * | 24 * |
| 13 * 2) Interceptors are specialized based on the selector it is used with. | 25 * 2) Interceptors are specialized based on the selector it is used with. |
| 14 * | 26 * |
| 15 * 3) If we know the object is not intercepted, we just use the object | 27 * 3) If we know the object is not intercepted, we just use the object |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 instruction = new HInvokeDynamicMethod( | 414 instruction = new HInvokeDynamicMethod( |
| 403 selector, mask, inputs, node.instructionType, true); | 415 selector, mask, inputs, node.instructionType, true); |
| 404 } | 416 } |
| 405 | 417 |
| 406 HBasicBlock block = node.block; | 418 HBasicBlock block = node.block; |
| 407 block.addAfter(node, instruction); | 419 block.addAfter(node, instruction); |
| 408 block.rewrite(node, instruction); | 420 block.rewrite(node, instruction); |
| 409 return true; | 421 return true; |
| 410 } | 422 } |
| 411 } | 423 } |
| OLD | NEW |