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

Unified Diff: src/compiler/move-optimizer.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/instruction.h ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/move-optimizer.cc
diff --git a/src/compiler/move-optimizer.cc b/src/compiler/move-optimizer.cc
index 94846012e2cfbdd7678d5befd5760c48c7767531..f4e05137756e0b903fd7527961b1be76515795fa 100644
--- a/src/compiler/move-optimizer.cc
+++ b/src/compiler/move-optimizer.cc
@@ -29,8 +29,8 @@ MoveOperands* PrepareInsertAfter(ParallelMove* left, MoveOperands* move,
}
DCHECK(!(replacement == to_eliminate && replacement != nullptr));
if (replacement != nullptr) {
- auto new_source = new (zone) InstructionOperand(
- replacement->source()->kind(), replacement->source()->index());
+ auto new_source = InstructionOperand::New(
+ zone, replacement->source()->kind(), replacement->source()->index());
move->set_source(new_source);
}
return to_eliminate;
@@ -186,8 +186,8 @@ void MoveOptimizer::FinalizeMoves(GapInstruction* gap) {
loads.push_back(move);
// Replace source with copy for later use.
auto dest = move->destination();
- move->set_destination(new (code_zone())
- InstructionOperand(dest->kind(), dest->index()));
+ move->set_destination(
+ InstructionOperand::New(code_zone(), dest->kind(), dest->index()));
continue;
}
if ((found->destination()->IsStackSlot() ||
@@ -199,7 +199,7 @@ void MoveOptimizer::FinalizeMoves(GapInstruction* gap) {
InstructionOperand::Kind found_kind = found->destination()->kind();
int found_index = found->destination()->index();
auto next_dest =
- new (code_zone()) InstructionOperand(found_kind, found_index);
+ InstructionOperand::New(code_zone(), found_kind, found_index);
auto dest = move->destination();
found->destination()->ConvertTo(dest->kind(), dest->index());
move->set_destination(next_dest);
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698