| 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" |
| 11 | 11 |
| 12 namespace v8 { | 12 namespace v8 { |
| 13 namespace internal { | 13 namespace internal { |
| 14 namespace compiler { | 14 namespace compiler { |
| 15 | 15 |
| 16 class TestCode : public HandleAndZoneScope { | 16 class TestCode : public HandleAndZoneScope { |
| 17 public: | 17 public: |
| 18 TestCode() | 18 TestCode() |
| 19 : HandleAndZoneScope(), | 19 : HandleAndZoneScope(), |
| 20 blocks_(main_zone()), | 20 blocks_(main_zone()), |
| 21 sequence_(main_isolate(), main_zone(), &blocks_), | 21 sequence_(main_isolate(), main_zone(), &blocks_, nullptr), |
| 22 rpo_number_(RpoNumber::FromInt(0)), | 22 rpo_number_(RpoNumber::FromInt(0)), |
| 23 current_(NULL) {} | 23 current_(NULL) {} |
| 24 | 24 |
| 25 ZoneVector<InstructionBlock*> blocks_; | 25 ZoneVector<InstructionBlock*> blocks_; |
| 26 InstructionSequence sequence_; | 26 InstructionSequence sequence_; |
| 27 RpoNumber rpo_number_; | 27 RpoNumber rpo_number_; |
| 28 InstructionBlock* current_; | 28 InstructionBlock* current_; |
| 29 | 29 |
| 30 int Jump(int target) { | 30 int Jump(int target) { |
| 31 Start(); | 31 Start(); |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 for (int k = 4; k < 5; k++) assembly[k]--; | 757 for (int k = 4; k < 5; k++) assembly[k]--; |
| 758 } | 758 } |
| 759 CheckAssemblyOrder(code, 5, assembly); | 759 CheckAssemblyOrder(code, 5, assembly); |
| 760 } | 760 } |
| 761 } | 761 } |
| 762 } | 762 } |
| 763 | 763 |
| 764 } // namespace compiler | 764 } // namespace compiler |
| 765 } // namespace internal | 765 } // namespace internal |
| 766 } // namespace v8 | 766 } // namespace v8 |
| OLD | NEW |