Index: test/unittests/compiler/instruction-sequence-unittest.cc |
diff --git a/test/unittests/compiler/instruction-sequence-unittest.cc b/test/unittests/compiler/instruction-sequence-unittest.cc |
index 0a17100f25de0e87c38ee9cae98c0d8fb00e2e61..975145402a9c8c96c044cfa4c3d05476d839235b 100644 |
--- a/test/unittests/compiler/instruction-sequence-unittest.cc |
+++ b/test/unittests/compiler/instruction-sequence-unittest.cc |
@@ -19,14 +19,6 @@ static const char* |
static char register_names_[10 * (RegisterConfiguration::kMaxGeneralRegisters + |
RegisterConfiguration::kMaxFPRegisters)]; |
-namespace { |
-static int allocatable_codes[InstructionSequenceTest::kDefaultNRegs] = { |
- 0, 1, 2, 3, 4, 5, 6, 7}; |
-static int allocatable_double_codes[InstructionSequenceTest::kDefaultNRegs] = { |
- 0, 1, 2, 3, 4, 5, 6, 7}; |
-} |
- |
- |
static void InitializeRegisterNames() { |
char* loc = register_names_; |
for (int i = 0; i < RegisterConfiguration::kMaxGeneralRegisters; ++i) { |
@@ -88,20 +80,10 @@ int InstructionSequenceTest::GetAllocatableCode(int index, |
} |
} |
-RegisterConfiguration* InstructionSequenceTest::config() { |
- if (!config_) { |
- config_.reset(new RegisterConfiguration( |
- num_general_registers_, num_double_registers_, num_general_registers_, |
- num_double_registers_, num_double_registers_, allocatable_codes, |
- allocatable_double_codes, |
- kSimpleFPAliasing ? RegisterConfiguration::OVERLAP |
- : RegisterConfiguration::COMBINE, |
- general_register_names_, |
- double_register_names_, // float register names |
- double_register_names_, |
- double_register_names_)); // SIMD 128 register names |
- } |
- return config_.get(); |
+extern const RegisterConfiguration* (*GetRegConfig)(); |
ivica.bogosavljevic
2016/10/19 14:30:40
Ugly but couldn't think of any better. If you have
titzer
2016/11/03 13:00:12
How about adding a separate method that has a XXXF
ivica.bogosavljevic
2016/11/03 15:22:54
Good idea!
|
+ |
+const RegisterConfiguration* InstructionSequenceTest::config() { |
+ return v8::internal::compiler::GetRegConfig(); |
} |