| 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 } | 385 } |
| 386 | 386 |
| 387 void InstructionSelector::SetEffectLevel(Node* node, int effect_level) { | 387 void InstructionSelector::SetEffectLevel(Node* node, int effect_level) { |
| 388 DCHECK_NOT_NULL(node); | 388 DCHECK_NOT_NULL(node); |
| 389 size_t const id = node->id(); | 389 size_t const id = node->id(); |
| 390 DCHECK_LT(id, effect_level_.size()); | 390 DCHECK_LT(id, effect_level_.size()); |
| 391 effect_level_[id] = effect_level; | 391 effect_level_[id] = effect_level; |
| 392 } | 392 } |
| 393 | 393 |
| 394 bool InstructionSelector::CanAddressRelativeToRootsRegister() const { | 394 bool InstructionSelector::CanAddressRelativeToRootsRegister() const { |
| 395 return (enable_serialization_ == kDisableSerialization && | 395 return enable_serialization_ == kDisableSerialization && |
| 396 (linkage()->GetIncomingDescriptor()->flags() & | 396 CanUseRootsRegister(); |
| 397 CallDescriptor::kCanUseRoots)); | 397 } |
| 398 |
| 399 bool InstructionSelector::CanUseRootsRegister() const { |
| 400 return linkage()->GetIncomingDescriptor()->flags() & |
| 401 CallDescriptor::kCanUseRoots; |
| 398 } | 402 } |
| 399 | 403 |
| 400 void InstructionSelector::MarkAsRepresentation(MachineRepresentation rep, | 404 void InstructionSelector::MarkAsRepresentation(MachineRepresentation rep, |
| 401 const InstructionOperand& op) { | 405 const InstructionOperand& op) { |
| 402 UnallocatedOperand unalloc = UnallocatedOperand::cast(op); | 406 UnallocatedOperand unalloc = UnallocatedOperand::cast(op); |
| 403 sequence()->MarkAsRepresentation(rep, unalloc.virtual_register()); | 407 sequence()->MarkAsRepresentation(rep, unalloc.virtual_register()); |
| 404 } | 408 } |
| 405 | 409 |
| 406 | 410 |
| 407 void InstructionSelector::MarkAsRepresentation(MachineRepresentation rep, | 411 void InstructionSelector::MarkAsRepresentation(MachineRepresentation rep, |
| (...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2121 return new (instruction_zone()) FrameStateDescriptor( | 2125 return new (instruction_zone()) FrameStateDescriptor( |
| 2122 instruction_zone(), state_info.type(), state_info.bailout_id(), | 2126 instruction_zone(), state_info.type(), state_info.bailout_id(), |
| 2123 state_info.state_combine(), parameters, locals, stack, | 2127 state_info.state_combine(), parameters, locals, stack, |
| 2124 state_info.shared_info(), outer_state); | 2128 state_info.shared_info(), outer_state); |
| 2125 } | 2129 } |
| 2126 | 2130 |
| 2127 | 2131 |
| 2128 } // namespace compiler | 2132 } // namespace compiler |
| 2129 } // namespace internal | 2133 } // namespace internal |
| 2130 } // namespace v8 | 2134 } // namespace v8 |
| OLD | NEW |