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

Side by Side Diff: test/cctest/compiler/test-instruction.cc

Issue 907873002: [turbofan] make zone allocation of InstructionOperand explicit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months 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 unified diff | Download patch
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/code-generator.h" 8 #include "src/compiler/code-generator.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return node; 83 return node;
84 } 84 }
85 85
86 int NewInstr() { 86 int NewInstr() {
87 InstructionCode opcode = static_cast<InstructionCode>(110); 87 InstructionCode opcode = static_cast<InstructionCode>(110);
88 TestInstr* instr = TestInstr::New(zone(), opcode); 88 TestInstr* instr = TestInstr::New(zone(), opcode);
89 return code->AddInstruction(instr); 89 return code->AddInstruction(instr);
90 } 90 }
91 91
92 UnallocatedOperand* NewUnallocated(int vreg) { 92 UnallocatedOperand* NewUnallocated(int vreg) {
93 return new (zone()) UnallocatedOperand(UnallocatedOperand::ANY, vreg); 93 return UnallocatedOperand(UnallocatedOperand::ANY, vreg).Copy(zone());
94 } 94 }
95 95
96 InstructionBlock* BlockAt(BasicBlock* block) { 96 InstructionBlock* BlockAt(BasicBlock* block) {
97 return code->InstructionBlockAt(block->GetRpoNumber()); 97 return code->InstructionBlockAt(block->GetRpoNumber());
98 } 98 }
99 BasicBlock* GetBasicBlock(int instruction_index) { 99 BasicBlock* GetBasicBlock(int instruction_index) {
100 const InstructionBlock* block = 100 const InstructionBlock* block =
101 code->GetInstructionBlock(instruction_index); 101 code->GetInstructionBlock(instruction_index);
102 return schedule.rpo_order()->at(block->rpo_number().ToSize()); 102 return schedule.rpo_order()->at(block->rpo_number().ToSize());
103 } 103 }
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 CHECK(inputs[z].Equals(m->InputAt(z))); 331 CHECK(inputs[z].Equals(m->InputAt(z)));
332 } 332 }
333 333
334 for (size_t z = 0; z < k; z++) { 334 for (size_t z = 0; z < k; z++) {
335 CHECK(temps[z].Equals(m->TempAt(z))); 335 CHECK(temps[z].Equals(m->TempAt(z)));
336 } 336 }
337 } 337 }
338 } 338 }
339 } 339 }
340 } 340 }
OLDNEW
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698