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

Unified Diff: src/compiler/code-generator.cc

Issue 1081053002: [turbofan] cleanup PointerMap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: renames Created 5 years, 8 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/code-generator.h ('k') | src/compiler/instruction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index 1fa61041d9b0648d3a39d988aaeaa4fd2b84cd21..b651825cd0e357666c3680ff28bc590b26b8c4ee 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -166,21 +166,18 @@ bool CodeGenerator::IsNextInAssemblyOrder(RpoNumber block) const {
}
-void CodeGenerator::RecordSafepoint(PointerMap* pointers, Safepoint::Kind kind,
- int arguments,
+void CodeGenerator::RecordSafepoint(ReferenceMap* references,
+ Safepoint::Kind kind, int arguments,
Safepoint::DeoptMode deopt_mode) {
- const ZoneList<InstructionOperand*>* operands =
- pointers->GetNormalizedOperands();
Safepoint safepoint =
safepoints()->DefineSafepoint(masm(), kind, arguments, deopt_mode);
- for (int i = 0; i < operands->length(); i++) {
- InstructionOperand* pointer = operands->at(i);
- if (pointer->IsStackSlot()) {
- safepoint.DefinePointerSlot(StackSlotOperand::cast(pointer)->index(),
+ for (auto& operand : references->reference_operands()) {
+ if (operand.IsStackSlot()) {
+ safepoint.DefinePointerSlot(StackSlotOperand::cast(operand).index(),
zone());
- } else if (pointer->IsRegister() && (kind & Safepoint::kWithRegisters)) {
- Register reg = Register::FromAllocationIndex(
- RegisterOperand::cast(pointer)->index());
+ } else if (operand.IsRegister() && (kind & Safepoint::kWithRegisters)) {
+ Register reg =
+ Register::FromAllocationIndex(RegisterOperand::cast(operand).index());
safepoint.DefinePointerRegister(reg, zone());
}
}
@@ -339,7 +336,7 @@ void CodeGenerator::RecordCallPosition(Instruction* instr) {
bool needs_frame_state = (flags & CallDescriptor::kNeedsFrameState);
RecordSafepoint(
- instr->pointer_map(), Safepoint::kSimple, 0,
+ instr->reference_map(), Safepoint::kSimple, 0,
needs_frame_state ? Safepoint::kLazyDeopt : Safepoint::kNoLazyDeopt);
if (flags & CallDescriptor::kHasExceptionHandler) {
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698