| 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 "src/v8.h" | 5 #include "src/v8.h" |
| 6 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
| 7 | 7 |
| 8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
| 9 #include "src/compiler/instruction-codes.h" | 9 #include "src/compiler/instruction-codes.h" |
| 10 #include "src/compiler/jump-threading.h" | 10 #include "src/compiler/jump-threading.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 rpo_number_ = RpoNumber::FromInt(rpo_number_.ToInt() + 1); | 82 rpo_number_ = RpoNumber::FromInt(rpo_number_.ToInt() + 1); |
| 83 } | 83 } |
| 84 InstructionOperand* UseRpo(int num) { | 84 InstructionOperand* UseRpo(int num) { |
| 85 int index = sequence_.AddImmediate(Constant(RpoNumber::FromInt(num))); | 85 int index = sequence_.AddImmediate(Constant(RpoNumber::FromInt(num))); |
| 86 return ImmediateOperand::Create(index, main_zone()); | 86 return ImmediateOperand::Create(index, main_zone()); |
| 87 } | 87 } |
| 88 void Start(bool deferred = false) { | 88 void Start(bool deferred = false) { |
| 89 if (current_ == NULL) { | 89 if (current_ == NULL) { |
| 90 current_ = new (main_zone()) InstructionBlock( | 90 current_ = new (main_zone()) InstructionBlock( |
| 91 main_zone(), BasicBlock::Id::FromInt(rpo_number_.ToInt()), | 91 main_zone(), BasicBlock::Id::FromInt(rpo_number_.ToInt()), |
| 92 rpo_number_, rpo_number_, RpoNumber::Invalid(), RpoNumber::Invalid(), | 92 rpo_number_, RpoNumber::Invalid(), RpoNumber::Invalid(), deferred); |
| 93 deferred); | |
| 94 blocks_.push_back(current_); | 93 blocks_.push_back(current_); |
| 95 sequence_.StartBlock(rpo_number_); | 94 sequence_.StartBlock(rpo_number_); |
| 96 } | 95 } |
| 97 } | 96 } |
| 98 void Defer() { | 97 void Defer() { |
| 99 CHECK(current_ == NULL); | 98 CHECK(current_ == NULL); |
| 100 Start(true); | 99 Start(true); |
| 101 } | 100 } |
| 102 }; | 101 }; |
| 103 | 102 |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 for (int k = 4; k < 5; k++) assembly[k]--; | 755 for (int k = 4; k < 5; k++) assembly[k]--; |
| 757 } | 756 } |
| 758 CheckAssemblyOrder(code, 5, assembly); | 757 CheckAssemblyOrder(code, 5, assembly); |
| 759 } | 758 } |
| 760 } | 759 } |
| 761 } | 760 } |
| 762 | 761 |
| 763 } // namespace compiler | 762 } // namespace compiler |
| 764 } // namespace internal | 763 } // namespace internal |
| 765 } // namespace v8 | 764 } // namespace v8 |
| OLD | NEW |