| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/bytecode-array-builder.h" | 7 #include "src/interpreter/bytecode-array-builder.h" |
| 8 #include "src/interpreter/bytecode-array-iterator.h" | 8 #include "src/interpreter/bytecode-array-iterator.h" |
| 9 #include "test/unittests/test-utils.h" | 9 #include "test/unittests/test-utils.h" |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 CHECK_EQ(iterator.current_bytecode(), Bytecode::kStar); | 89 CHECK_EQ(iterator.current_bytecode(), Bytecode::kStar); |
| 90 CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_2.index()); | 90 CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_2.index()); |
| 91 CHECK(!iterator.done()); | 91 CHECK(!iterator.done()); |
| 92 iterator.Advance(); | 92 iterator.Advance(); |
| 93 | 93 |
| 94 CHECK_EQ(iterator.current_bytecode(), Bytecode::kCallRuntime); | 94 CHECK_EQ(iterator.current_bytecode(), Bytecode::kCallRuntime); |
| 95 CHECK_EQ(static_cast<Runtime::FunctionId>(iterator.GetIndexOperand(0)), | 95 CHECK_EQ(static_cast<Runtime::FunctionId>(iterator.GetIndexOperand(0)), |
| 96 Runtime::kLoadIC_Miss); | 96 Runtime::kLoadIC_Miss); |
| 97 CHECK_EQ(iterator.GetRegisterOperand(1).index(), reg_0.index()); | 97 CHECK_EQ(iterator.GetRegisterOperand(1).index(), reg_0.index()); |
| 98 CHECK_EQ(iterator.GetCountOperand(2), 1); | 98 CHECK_EQ(iterator.GetRegisterCountOperand(2), 1); |
| 99 CHECK(!iterator.done()); | 99 CHECK(!iterator.done()); |
| 100 iterator.Advance(); | 100 iterator.Advance(); |
| 101 | 101 |
| 102 CHECK_EQ(iterator.current_bytecode(), Bytecode::kDebugger); | 102 CHECK_EQ(iterator.current_bytecode(), Bytecode::kDebugger); |
| 103 CHECK(!iterator.done()); | 103 CHECK(!iterator.done()); |
| 104 iterator.Advance(); | 104 iterator.Advance(); |
| 105 | 105 |
| 106 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 106 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
| 107 CHECK(!iterator.done()); | 107 CHECK(!iterator.done()); |
| 108 iterator.Advance(); | 108 iterator.Advance(); |
| 109 CHECK(iterator.done()); | 109 CHECK(iterator.done()); |
| 110 } | 110 } |
| 111 | 111 |
| 112 } // namespace interpreter | 112 } // namespace interpreter |
| 113 } // namespace internal | 113 } // namespace internal |
| 114 } // namespace v8 | 114 } // namespace v8 |
| OLD | NEW |