Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: test/unittests/compiler/register-allocator-unittest.cc

Issue 727733002: [turbofan] refactor pipeline to use hydrogen like Run calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/compiler/test-instruction.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/register-allocator-unittest.cc
diff --git a/test/unittests/compiler/register-allocator-unittest.cc b/test/unittests/compiler/register-allocator-unittest.cc
index 074789bae4ecc92fe8e39a000ec84f4d689796ad..6866389fef52cbceb28e359cbc8800d2507aea2d 100644
--- a/test/unittests/compiler/register-allocator-unittest.cc
+++ b/test/unittests/compiler/register-allocator-unittest.cc
@@ -124,7 +124,9 @@ class RegisterAllocatorTest : public TestWithZone {
}
RegisterAllocatorTest()
- : num_general_registers_(kDefaultNRegs),
+ : frame_(nullptr),
+ sequence_(nullptr),
+ num_general_registers_(kDefaultNRegs),
num_double_registers_(kDefaultNRegs),
instruction_blocks_(zone()),
current_instruction_index_(-1),
@@ -151,17 +153,18 @@ class RegisterAllocatorTest : public TestWithZone {
}
Frame* frame() {
- if (frame_.is_empty()) {
- frame_.Reset(new Frame());
+ if (frame_ == nullptr) {
+ frame_ = new (zone()) Frame();
}
- return frame_.get();
+ return frame_;
}
InstructionSequence* sequence() {
- if (sequence_.is_empty()) {
- sequence_.Reset(new InstructionSequence(zone(), &instruction_blocks_));
+ if (sequence_ == nullptr) {
+ sequence_ =
+ new (zone()) InstructionSequence(zone(), &instruction_blocks_);
}
- return sequence_.get();
+ return sequence_;
}
RegisterAllocator* allocator() {
@@ -516,9 +519,9 @@ class RegisterAllocatorTest : public TestWithZone {
typedef std::vector<BlockCompletion> Completions;
SmartPointer<RegisterConfiguration> config_;
- SmartPointer<Frame> frame_;
+ Frame* frame_;
SmartPointer<RegisterAllocator> allocator_;
- SmartPointer<InstructionSequence> sequence_;
+ InstructionSequence* sequence_;
int num_general_registers_;
int num_double_registers_;
« no previous file with comments | « test/cctest/compiler/test-instruction.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698