| 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/base/utils/random-number-generator.h" | 5 #include "src/base/utils/random-number-generator.h" |
| 6 #include "src/compiler/pipeline.h" | 6 #include "src/compiler/pipeline.h" |
| 7 #include "test/unittests/compiler/instruction-sequence-unittest.h" | 7 #include "test/unittests/compiler/instruction-sequence-unittest.h" |
| 8 #include "test/unittests/test-utils.h" | 8 #include "test/unittests/test-utils.h" |
| 9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 config_.Reset(new RegisterConfiguration( | 62 config_.Reset(new RegisterConfiguration( |
| 63 num_general_registers_, num_double_registers_, num_double_registers_, | 63 num_general_registers_, num_double_registers_, num_double_registers_, |
| 64 general_register_names_, double_register_names_)); | 64 general_register_names_, double_register_names_)); |
| 65 } | 65 } |
| 66 return config_.get(); | 66 return config_.get(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 | 69 |
| 70 InstructionSequence* InstructionSequenceTest::sequence() { | 70 InstructionSequence* InstructionSequenceTest::sequence() { |
| 71 if (sequence_ == nullptr) { | 71 if (sequence_ == nullptr) { |
| 72 sequence_ = new (zone()) InstructionSequence(zone(), &instruction_blocks_); | 72 sequence_ = new (zone()) |
| 73 InstructionSequence(isolate(), zone(), &instruction_blocks_); |
| 73 } | 74 } |
| 74 return sequence_; | 75 return sequence_; |
| 75 } | 76 } |
| 76 | 77 |
| 77 | 78 |
| 78 void InstructionSequenceTest::StartLoop(int loop_blocks) { | 79 void InstructionSequenceTest::StartLoop(int loop_blocks) { |
| 79 CHECK(current_block_ == nullptr); | 80 CHECK(current_block_ == nullptr); |
| 80 if (!loop_blocks_.empty()) { | 81 if (!loop_blocks_.empty()) { |
| 81 CHECK(!loop_blocks_.back().loop_header_.IsValid()); | 82 CHECK(!loop_blocks_.back().loop_header_.IsValid()); |
| 82 } | 83 } |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 | 467 |
| 467 int InstructionSequenceTest::AddInstruction(int instruction_index, | 468 int InstructionSequenceTest::AddInstruction(int instruction_index, |
| 468 Instruction* instruction) { | 469 Instruction* instruction) { |
| 469 sequence()->AddInstruction(instruction); | 470 sequence()->AddInstruction(instruction); |
| 470 return instruction_index; | 471 return instruction_index; |
| 471 } | 472 } |
| 472 | 473 |
| 473 } // namespace compiler | 474 } // namespace compiler |
| 474 } // namespace internal | 475 } // namespace internal |
| 475 } // namespace v8 | 476 } // namespace v8 |
| OLD | NEW |