OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/factory.h" | 7 #include "src/factory.h" |
8 #include "src/interpreter/bytecode-label.h" | 8 #include "src/interpreter/bytecode-label.h" |
9 #include "src/interpreter/bytecode-peephole-optimizer.h" | 9 #include "src/interpreter/bytecode-peephole-optimizer.h" |
10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 BytecodeNode first(Bytecode::kLdaZero); | 389 BytecodeNode first(Bytecode::kLdaZero); |
390 uint32_t reg_operand = Register(0).ToOperand(); | 390 uint32_t reg_operand = Register(0).ToOperand(); |
391 uint32_t idx_operand = 1; | 391 uint32_t idx_operand = 1; |
392 BytecodeNode second(operator_replacement[0], reg_operand, idx_operand); | 392 BytecodeNode second(operator_replacement[0], reg_operand, idx_operand); |
393 optimizer()->Write(&first); | 393 optimizer()->Write(&first); |
394 optimizer()->Write(&second); | 394 optimizer()->Write(&second); |
395 Flush(); | 395 Flush(); |
396 CHECK_EQ(write_count(), 1); | 396 CHECK_EQ(write_count(), 1); |
397 CHECK_EQ(last_written().bytecode(), operator_replacement[1]); | 397 CHECK_EQ(last_written().bytecode(), operator_replacement[1]); |
398 CHECK_EQ(last_written().operand_count(), 3); | 398 CHECK_EQ(last_written().operand_count(), 3); |
399 CHECK_EQ(last_written().operand(0), 0); | 399 CHECK_EQ(last_written().operand(0), 0u); |
400 CHECK_EQ(last_written().operand(1), reg_operand); | 400 CHECK_EQ(last_written().operand(1), reg_operand); |
401 CHECK_EQ(last_written().operand(2), idx_operand); | 401 CHECK_EQ(last_written().operand(2), idx_operand); |
402 Reset(); | 402 Reset(); |
403 } | 403 } |
404 } | 404 } |
405 | 405 |
406 } // namespace interpreter | 406 } // namespace interpreter |
407 } // namespace internal | 407 } // namespace internal |
408 } // namespace v8 | 408 } // namespace v8 |
OLD | NEW |