Version 3.18.5
Allowed setting debugger breakpoints on CompareNilICs (issue 2660)
Fixed beyond-heap load on x64 Crankshafted StringCharFromCode (Chromium issue 235311)
Change 'Parse error' to three more informative messages. (Chromium issue 2636)
Performance and stability improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@14498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/frames-inl.h b/src/frames-inl.h
index 83b37a5..7901a5e 100644
--- a/src/frames-inl.h
+++ b/src/frames-inl.h
@@ -213,6 +213,33 @@
}
+inline Address JavaScriptFrame::GetOperandSlot(int index) const {
+ Address base = fp() + JavaScriptFrameConstants::kLocal0Offset;
+ ASSERT(IsAddressAligned(base, kPointerSize));
+ ASSERT(type() == JAVA_SCRIPT);
+ ASSERT(index < ComputeOperandsCount());
+ // Operand stack grows down.
+ return base - index * kPointerSize;
+}
+
+
+inline Object* JavaScriptFrame::GetOperand(int index) const {
+ return Memory::Object_at(GetOperandSlot(index));
+}
+
+
+inline int JavaScriptFrame::ComputeOperandsCount() const {
+ Address base = fp() + JavaScriptFrameConstants::kLocal0Offset;
+ // Base points to low address of first operand and stack grows down, so add
+ // kPointerSize to get the actual stack size.
+ intptr_t stack_size_in_bytes = (base + kPointerSize) - sp();
+ ASSERT(IsAligned(stack_size_in_bytes, kPointerSize));
+ ASSERT(type() == JAVA_SCRIPT);
+ ASSERT(stack_size_in_bytes >= 0);
+ return static_cast<int>(stack_size_in_bytes >> kPointerSizeLog2);
+}
+
+
inline Object* JavaScriptFrame::receiver() const {
return GetParameter(-1);
}