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

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

Issue 1702593002: More simplification and unification of frame handling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64 Created 4 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 | « no previous file | src/compiler/frame.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 57d14a290a6274614c2fa46571043f902be0b264..93955e33d3db37b500ed5be645b4f4df6df52a50 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -177,12 +177,12 @@ Handle<Code> CodeGenerator::GenerateCode() {
}
}
- safepoints()->Emit(masm(), frame()->GetSpillSlotCount());
+ safepoints()->Emit(masm(), frame()->GetTotalFrameSlotCount());
Handle<Code> result =
v8::internal::CodeGenerator::MakeCodeEpilogue(masm(), info);
result->set_is_turbofanned(true);
- result->set_stack_slots(frame()->GetSpillSlotCount());
+ result->set_stack_slots(frame()->GetTotalFrameSlotCount());
result->set_safepoint_table_offset(safepoints()->GetCodeOffset());
// Emit exception handler table.
@@ -236,15 +236,12 @@ void CodeGenerator::RecordSafepoint(ReferenceMap* references,
if (operand.IsStackSlot()) {
int index = LocationOperand::cast(operand).index();
DCHECK(index >= 0);
- // Safepoint table indices are 0-based from the beginning of the spill
- // slot area, adjust appropriately.
- index -= stackSlotToSpillSlotDelta;
// We might index values in the fixed part of the frame (i.e. the
// closure pointer or the context pointer); these are not spill slots
// and therefore don't work with the SafepointTable currently, but
// we also don't need to worry about them, since the GC has special
// knowledge about those fields anyway.
- if (index < 0) continue;
+ if (index < stackSlotToSpillSlotDelta) continue;
safepoint.DefinePointerSlot(index, zone());
} else if (operand.IsRegister() && (kind & Safepoint::kWithRegisters)) {
Register reg = LocationOperand::cast(operand).GetRegister();
« no previous file with comments | « no previous file | src/compiler/frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698