summaryrefslogtreecommitdiff
path: root/deps/v8/src/crankshaft/lithium-allocator.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2016-09-06 22:49:51 +0200
committerMichaël Zasso <targos@protonmail.com>2016-09-22 09:51:19 +0200
commitec02b811a8a5c999bab4de312be2d732b7d9d50b (patch)
treeca3068017254f238cf413a451c57a803572983a4 /deps/v8/src/crankshaft/lithium-allocator.cc
parentd2eb7ce0105369a9cad82787cb33a665e9bd00ad (diff)
downloadnode-new-ec02b811a8a5c999bab4de312be2d732b7d9d50b.tar.gz
deps: update V8 to 5.4.500.27
Pick up latest commit from the 5.4-lkgr branch. deps: edit V8 gitignore to allow trace event copy deps: update V8 trace event to 315bf1e2d45be7d53346c31cfcc37424a32c30c8 deps: edit V8 gitignore to allow gtest_prod.h copy deps: update V8 gtest to 6f8a66431cb592dad629028a50b3dd418a408c87 PR-URL: https://github.com/nodejs/node/pull/8317 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/src/crankshaft/lithium-allocator.cc')
-rw-r--r--deps/v8/src/crankshaft/lithium-allocator.cc26
1 files changed, 10 insertions, 16 deletions
diff --git a/deps/v8/src/crankshaft/lithium-allocator.cc b/deps/v8/src/crankshaft/lithium-allocator.cc
index 6155dc0f23..d17cd27c10 100644
--- a/deps/v8/src/crankshaft/lithium-allocator.cc
+++ b/deps/v8/src/crankshaft/lithium-allocator.cc
@@ -13,6 +13,8 @@
namespace v8 {
namespace internal {
+const auto GetRegConfig = RegisterConfiguration::Crankshaft;
+
static inline LifetimePosition Min(LifetimePosition a, LifetimePosition b) {
return a.Value() < b.Value() ? a : b;
}
@@ -940,7 +942,7 @@ void LAllocator::ProcessInstructions(HBasicBlock* block, BitVector* live) {
if (instr->ClobbersRegisters()) {
for (int i = 0; i < Register::kNumRegisters; ++i) {
- if (Register::from_code(i).IsAllocatable()) {
+ if (GetRegConfig()->IsAllocatableGeneralCode(i)) {
if (output == NULL || !output->IsRegister() ||
output->index() != i) {
LiveRange* range = FixedLiveRangeFor(i);
@@ -953,7 +955,7 @@ void LAllocator::ProcessInstructions(HBasicBlock* block, BitVector* live) {
if (instr->ClobbersDoubleRegisters(isolate())) {
for (int i = 0; i < DoubleRegister::kMaxNumRegisters; ++i) {
- if (DoubleRegister::from_code(i).IsAllocatable()) {
+ if (GetRegConfig()->IsAllocatableDoubleCode(i)) {
if (output == NULL || !output->IsDoubleRegister() ||
output->index() != i) {
LiveRange* range = FixedDoubleLiveRangeFor(i);
@@ -1460,12 +1462,8 @@ void LAllocator::PopulatePointerMaps() {
void LAllocator::AllocateGeneralRegisters() {
LAllocatorPhase phase("L_Allocate general registers", this);
- num_registers_ =
- RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
- ->num_allocatable_general_registers();
- allocatable_register_codes_ =
- RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
- ->allocatable_general_codes();
+ num_registers_ = GetRegConfig()->num_allocatable_general_registers();
+ allocatable_register_codes_ = GetRegConfig()->allocatable_general_codes();
mode_ = GENERAL_REGISTERS;
AllocateRegisters();
}
@@ -1473,12 +1471,8 @@ void LAllocator::AllocateGeneralRegisters() {
void LAllocator::AllocateDoubleRegisters() {
LAllocatorPhase phase("L_Allocate double registers", this);
- num_registers_ =
- RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
- ->num_allocatable_double_registers();
- allocatable_register_codes_ =
- RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
- ->allocatable_double_codes();
+ num_registers_ = GetRegConfig()->num_allocatable_double_registers();
+ allocatable_register_codes_ = GetRegConfig()->allocatable_double_codes();
mode_ = DOUBLE_REGISTERS;
AllocateRegisters();
}
@@ -1596,9 +1590,9 @@ void LAllocator::AllocateRegisters() {
const char* LAllocator::RegisterName(int allocation_index) {
if (mode_ == GENERAL_REGISTERS) {
- return Register::from_code(allocation_index).ToString();
+ return GetRegConfig()->GetGeneralRegisterName(allocation_index);
} else {
- return DoubleRegister::from_code(allocation_index).ToString();
+ return GetRegConfig()->GetDoubleRegisterName(allocation_index);
}
}