Index: src/lithium.cc |
diff --git a/src/lithium.cc b/src/lithium.cc |
index ff5af7f31e81df3c7e8e7405716236db16e27f16..5967e429a97c318d6ae0e90437e105a929379cf8 100644 |
--- a/src/lithium.cc |
+++ b/src/lithium.cc |
@@ -257,6 +257,18 @@ int ElementsKindToShiftSize(ElementsKind elements_kind) { |
} |
+int StackSlotOffset(int index) { |
+ if (index >= 0) { |
+ // Local or spill slot. Skip the frame pointer, function, and |
+ // context in the fixed part of the frame. |
+ return -(index + 3) * kPointerSize; |
+ } else { |
+ // Incoming parameter. Skip the return address. |
+ return -(index - 1) * kPointerSize; |
+ } |
+} |
+ |
+ |
LChunk::LChunk(CompilationInfo* info, HGraph* graph) |
: spill_slot_count_(0), |
info_(info), |