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

Unified Diff: src/deoptimizer.cc

Issue 1261923007: [turbofan] Unify referencing of stack slots (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 5 years, 4 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/deoptimizer.h ('k') | src/frames.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 4022a7e08523ea05f238aea464e80ccbfe42cd24..0efc4de369e0f78afcb44c2c0959756b013cf4ef 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -2609,22 +2609,6 @@ int TranslatedValue::GetChildrenCount() const {
}
-int TranslatedState::SlotOffsetFp(int slot_index) {
- if (slot_index >= 0) {
- const int offset = StandardFrameConstants::kExpressionsOffset;
- return offset - (slot_index * kPointerSize);
- } else {
- const int offset = StandardFrameConstants::kCallerSPOffset;
- return offset - ((slot_index + 1) * kPointerSize);
- }
-}
-
-
-Address TranslatedState::SlotAddress(Address fp, int slot_index) {
- return fp + SlotOffsetFp(slot_index);
-}
-
-
uint32_t TranslatedState::GetUInt32Slot(Address fp, int slot_offset) {
Address address = fp + slot_offset;
#if V8_TARGET_BIG_ENDIAN && V8_HOST_ARCH_64_BIT
@@ -2947,7 +2931,8 @@ TranslatedValue TranslatedState::CreateNextTranslatedValue(
}
case Translation::STACK_SLOT: {
- int slot_offset = SlotOffsetFp(iterator->Next());
+ int slot_offset =
+ OptimizedFrame::StackSlotOffsetRelativeToFp(iterator->Next());
intptr_t value = *(reinterpret_cast<intptr_t*>(fp + slot_offset));
if (trace_file != nullptr) {
PrintF(trace_file, "0x%08" V8PRIxPTR " ; [fp %c %d] ", value,
@@ -2958,7 +2943,8 @@ TranslatedValue TranslatedState::CreateNextTranslatedValue(
}
case Translation::INT32_STACK_SLOT: {
- int slot_offset = SlotOffsetFp(iterator->Next());
+ int slot_offset =
+ OptimizedFrame::StackSlotOffsetRelativeToFp(iterator->Next());
uint32_t value = GetUInt32Slot(fp, slot_offset);
if (trace_file != nullptr) {
PrintF(trace_file, "%d ; (int) [fp %c %d] ",
@@ -2969,7 +2955,8 @@ TranslatedValue TranslatedState::CreateNextTranslatedValue(
}
case Translation::UINT32_STACK_SLOT: {
- int slot_offset = SlotOffsetFp(iterator->Next());
+ int slot_offset =
+ OptimizedFrame::StackSlotOffsetRelativeToFp(iterator->Next());
uint32_t value = GetUInt32Slot(fp, slot_offset);
if (trace_file != nullptr) {
PrintF(trace_file, "%u ; (uint) [fp %c %d] ", value,
@@ -2979,7 +2966,8 @@ TranslatedValue TranslatedState::CreateNextTranslatedValue(
}
case Translation::BOOL_STACK_SLOT: {
- int slot_offset = SlotOffsetFp(iterator->Next());
+ int slot_offset =
+ OptimizedFrame::StackSlotOffsetRelativeToFp(iterator->Next());
uint32_t value = GetUInt32Slot(fp, slot_offset);
if (trace_file != nullptr) {
PrintF(trace_file, "%u ; (bool) [fp %c %d] ", value,
@@ -2989,7 +2977,8 @@ TranslatedValue TranslatedState::CreateNextTranslatedValue(
}
case Translation::DOUBLE_STACK_SLOT: {
- int slot_offset = SlotOffsetFp(iterator->Next());
+ int slot_offset =
+ OptimizedFrame::StackSlotOffsetRelativeToFp(iterator->Next());
double value = ReadDoubleValue(fp + slot_offset);
if (trace_file != nullptr) {
PrintF(trace_file, "%e ; (double) [fp %c %d] ", value,
« no previous file with comments | « src/deoptimizer.h ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698