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 <stack> | 5 #include <stack> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/interpreter/register-translator.h" | 9 #include "src/interpreter/register-translator.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 | 66 |
67 TEST_F(RegisterTranslatorTest, TestFrameSizeAdjustmentsForTranslationWindow) { | 67 TEST_F(RegisterTranslatorTest, TestFrameSizeAdjustmentsForTranslationWindow) { |
68 EXPECT_EQ(0, RegisterTranslator::RegisterCountAdjustment(0, 0)); | 68 EXPECT_EQ(0, RegisterTranslator::RegisterCountAdjustment(0, 0)); |
69 EXPECT_EQ(0, RegisterTranslator::RegisterCountAdjustment(10, 10)); | 69 EXPECT_EQ(0, RegisterTranslator::RegisterCountAdjustment(10, 10)); |
70 EXPECT_EQ(window_width(), | 70 EXPECT_EQ(window_width(), |
71 RegisterTranslator::RegisterCountAdjustment(173, 0)); | 71 RegisterTranslator::RegisterCountAdjustment(173, 0)); |
72 EXPECT_EQ(window_width(), | 72 EXPECT_EQ(window_width(), |
73 RegisterTranslator::RegisterCountAdjustment(173, 137)); | 73 RegisterTranslator::RegisterCountAdjustment(173, 137)); |
74 EXPECT_EQ(window_width(), | 74 EXPECT_EQ(window_width(), |
75 RegisterTranslator::RegisterCountAdjustment(173, 137)); | 75 RegisterTranslator::RegisterCountAdjustment(173, 137)); |
76 EXPECT_EQ(0, RegisterTranslator::RegisterCountAdjustment(0, 120)); | 76 int param_limit = FLAG_enable_embedded_constant_pool ? 119 : 120; |
oth
2016/02/12 17:33:44
Maybe we should fix this with a kMaxParameters8 th
| |
77 EXPECT_EQ(0, RegisterTranslator::RegisterCountAdjustment(0, param_limit)); | |
77 EXPECT_EQ(window_limit(), | 78 EXPECT_EQ(window_limit(), |
78 RegisterTranslator::RegisterCountAdjustment(0, 128)); | 79 RegisterTranslator::RegisterCountAdjustment(0, 128)); |
79 EXPECT_EQ(window_limit(), | 80 EXPECT_EQ(window_limit(), |
80 RegisterTranslator::RegisterCountAdjustment(0, 129)); | 81 RegisterTranslator::RegisterCountAdjustment(0, 129)); |
81 EXPECT_EQ(window_limit() - 32, | 82 EXPECT_EQ(window_limit() - 32, |
82 RegisterTranslator::RegisterCountAdjustment(32, 129)); | 83 RegisterTranslator::RegisterCountAdjustment(32, 129)); |
83 } | 84 } |
84 | 85 |
85 TEST_F(RegisterTranslatorTest, TestInTranslationWindow) { | 86 TEST_F(RegisterTranslatorTest, TestInTranslationWindow) { |
86 EXPECT_GE(window_start(), 0); | 87 EXPECT_GE(window_start(), 0); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
249 uint32_t operands[] = {receiver.ToRawOperand(), index.ToRawOperand(), | 250 uint32_t operands[] = {receiver.ToRawOperand(), index.ToRawOperand(), |
250 cache_info_pair.ToRawOperand()}; | 251 cache_info_pair.ToRawOperand()}; |
251 ASSERT_DEATH_IF_SUPPORTED( | 252 ASSERT_DEATH_IF_SUPPORTED( |
252 translator()->TranslateInputRegisters(Bytecode::kForInNext, operands, 3), | 253 translator()->TranslateInputRegisters(Bytecode::kForInNext, operands, 3), |
253 kBadOperandRegex); | 254 kBadOperandRegex); |
254 } | 255 } |
255 | 256 |
256 } // namespace interpreter | 257 } // namespace interpreter |
257 } // namespace internal | 258 } // namespace internal |
258 } // namespace v8 | 259 } // namespace v8 |
OLD | NEW |