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

Unified Diff: src/compiler/register-allocator.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/move-optimizer.cc ('k') | test/cctest/compiler/test-instruction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/register-allocator.cc
diff --git a/src/compiler/register-allocator.cc b/src/compiler/register-allocator.cc
index 6423eb84a81f69d60afbc627f47982a3e32f69ed..0d53c06f58373a050e879b3e999b98571065546f 100644
--- a/src/compiler/register-allocator.cc
+++ b/src/compiler/register-allocator.cc
@@ -948,7 +948,7 @@ void RegisterAllocator::AssignSpillSlots() {
auto op_kind = kind == DOUBLE_REGISTERS
? InstructionOperand::DOUBLE_STACK_SLOT
: InstructionOperand::STACK_SLOT;
- auto op = new (code_zone()) InstructionOperand(op_kind, index);
+ auto op = InstructionOperand::New(code_zone(), op_kind, index);
range->SetOperand(op);
}
}
@@ -1105,9 +1105,9 @@ void RegisterAllocator::MeetRegisterConstraintsForLastInstructionInBlock(
// Create an unconstrained operand for the same virtual register
// and insert a gap move from the fixed output to the operand.
- UnallocatedOperand* output_copy = new (code_zone())
- UnallocatedOperand(UnallocatedOperand::ANY, output_vreg);
-
+ UnallocatedOperand* output_copy =
+ UnallocatedOperand(UnallocatedOperand::ANY, output_vreg)
+ .Copy(code_zone());
AddGapMove(gap_index, GapInstruction::START, output, output_copy);
}
}
« no previous file with comments | « src/compiler/move-optimizer.cc ('k') | test/cctest/compiler/test-instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698