| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
| 10 #include "src/compiler/instruction-selector-impl.h" | 10 #include "src/compiler/instruction-selector-impl.h" |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 } | 577 } |
| 578 } | 578 } |
| 579 | 579 |
| 580 // The first argument is always the callee code. | 580 // The first argument is always the callee code. |
| 581 Node* callee = call->InputAt(0); | 581 Node* callee = call->InputAt(0); |
| 582 bool call_code_immediate = (flags & kCallCodeImmediate) != 0; | 582 bool call_code_immediate = (flags & kCallCodeImmediate) != 0; |
| 583 bool call_address_immediate = (flags & kCallAddressImmediate) != 0; | 583 bool call_address_immediate = (flags & kCallAddressImmediate) != 0; |
| 584 switch (buffer->descriptor->kind()) { | 584 switch (buffer->descriptor->kind()) { |
| 585 case CallDescriptor::kCallCodeObject: | 585 case CallDescriptor::kCallCodeObject: |
| 586 buffer->instruction_args.push_back( | 586 buffer->instruction_args.push_back( |
| 587 (call_code_immediate && callee->opcode() == IrOpcode::kHeapConstant) | 587 (call_code_immediate && |
| 588 (callee->opcode() == IrOpcode::kHeapConstant || |
| 589 callee->opcode() == IrOpcode::kRelocatableInt32Constant)) |
| 588 ? g.UseImmediate(callee) | 590 ? g.UseImmediate(callee) |
| 589 : g.UseRegister(callee)); | 591 : g.UseRegister(callee)); |
| 590 break; | 592 break; |
| 591 case CallDescriptor::kCallAddress: | 593 case CallDescriptor::kCallAddress: |
| 592 buffer->instruction_args.push_back( | 594 buffer->instruction_args.push_back( |
| 593 (call_address_immediate && | 595 (call_address_immediate && |
| 594 callee->opcode() == IrOpcode::kExternalConstant) | 596 callee->opcode() == IrOpcode::kExternalConstant) |
| 595 ? g.UseImmediate(callee) | 597 ? g.UseImmediate(callee) |
| 596 : g.UseRegister(callee)); | 598 : g.UseRegister(callee)); |
| 597 break; | 599 break; |
| (...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1828 return new (instruction_zone()) FrameStateDescriptor( | 1830 return new (instruction_zone()) FrameStateDescriptor( |
| 1829 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1831 instruction_zone(), state_info.type(), state_info.bailout_id(), |
| 1830 state_info.state_combine(), parameters, locals, stack, | 1832 state_info.state_combine(), parameters, locals, stack, |
| 1831 state_info.shared_info(), outer_state); | 1833 state_info.shared_info(), outer_state); |
| 1832 } | 1834 } |
| 1833 | 1835 |
| 1834 | 1836 |
| 1835 } // namespace compiler | 1837 } // namespace compiler |
| 1836 } // namespace internal | 1838 } // namespace internal |
| 1837 } // namespace v8 | 1839 } // namespace v8 |
| OLD | NEW |