Revision: 15966
Author: [email protected]
Date: Tue Jul 30 16:59:55 2013
Log: Introduce the SetFp function in StackHandler
The FP setting is different for X32 than the other platforms as
kFPOnStackSize is double the kPointerSize and we have to clear the
higher 32 bits to 0.
[email protected]
Review URL: https://codereview.chromium.org/20073004
http://code.google.com/p/v8/source/detail?r=15966
Modified:
/branches/bleeding_edge/src/arm/frames-arm.h
/branches/bleeding_edge/src/frames.cc
/branches/bleeding_edge/src/frames.h
/branches/bleeding_edge/src/ia32/frames-ia32.h
/branches/bleeding_edge/src/mips/frames-mips.h
/branches/bleeding_edge/src/x64/frames-x64.h
=======================================
--- /branches/bleeding_edge/src/arm/frames-arm.h Mon Apr 8 04:17:32 2013
+++ /branches/bleeding_edge/src/arm/frames-arm.h Tue Jul 30 16:59:55 2013
@@ -169,6 +169,11 @@
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
}
+
+
+inline void StackHandler::SetFp(Address slot, Address fp) {
+ Memory::Address_at(slot) = fp;
+}
} } // namespace v8::internal
=======================================
--- /branches/bleeding_edge/src/frames.cc Tue Jul 23 08:01:38 2013
+++ /branches/bleeding_edge/src/frames.cc Tue Jul 30 16:59:55 2013
@@ -1521,9 +1521,9 @@
FixedArray* array,
int offset,
int previous_handler_offset) const {
- STATIC_ASSERT(StackHandlerConstants::kSlotCount == 5);
+ STATIC_ASSERT(StackHandlerConstants::kSlotCount >= 5);
ASSERT_LE(0, offset);
- ASSERT_GE(array->length(), offset + 5);
+ ASSERT_GE(array->length(), offset + StackHandlerConstants::kSlotCount);
// Unwinding a stack handler into an array chains it in the opposite
// direction, re-using the "next" slot as a "previous" link, so that
stack
// handlers can be later re-wound in the correct order. Decode
the "state"
@@ -1542,9 +1542,9 @@
FixedArray* array,
int offset,
Address fp) {
- STATIC_ASSERT(StackHandlerConstants::kSlotCount == 5);
+ STATIC_ASSERT(StackHandlerConstants::kSlotCount >= 5);
ASSERT_LE(0, offset);
- ASSERT_GE(array->length(), offset + 5);
+ ASSERT_GE(array->length(), offset + StackHandlerConstants::kSlotCount);
Smi* prev_handler_offset = Smi::cast(array->get(offset));
Code* code = Code::cast(array->get(offset + 1));
Smi* smi_index = Smi::cast(array->get(offset + 2));
@@ -1560,7 +1560,7 @@
Memory::uintptr_at(address() + StackHandlerConstants::kStateOffset) =
state;
Memory::Object_at(address() + StackHandlerConstants::kContextOffset) =
context;
- Memory::Address_at(address() + StackHandlerConstants::kFPOffset) = fp;
+ SetFp(address() + StackHandlerConstants::kFPOffset, fp);
*isolate->handler_address() = address();
=======================================
--- /branches/bleeding_edge/src/frames.h Tue Jul 23 08:01:38 2013
+++ /branches/bleeding_edge/src/frames.h Tue Jul 30 16:59:55 2013
@@ -145,6 +145,7 @@
inline Object** context_address() const;
inline Object** code_address() const;
+ inline void SetFp(Address slot, Address fp);
DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler);
};
@@ -176,7 +177,7 @@
static const int kContextOffset = -1 * kPointerSize;
static const int kCallerFPOffset = 0 * kPointerSize;
static const int kCallerPCOffset = +1 * kFPOnStackSize;
- static const int kCallerSPOffset = +2 * kPCOnStackSize;
+ static const int kCallerSPOffset = kCallerPCOffset + 1 *
kPCOnStackSize;
};
=======================================
--- /branches/bleeding_edge/src/ia32/frames-ia32.h Mon Apr 8 04:17:32 2013
+++ /branches/bleeding_edge/src/ia32/frames-ia32.h Tue Jul 30 16:59:55 2013
@@ -134,6 +134,11 @@
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
}
+
+
+inline void StackHandler::SetFp(Address slot, Address fp) {
+ Memory::Address_at(slot) = fp;
+}
} } // namespace v8::internal
=======================================
--- /branches/bleeding_edge/src/mips/frames-mips.h Mon Apr 8 04:17:32 2013
+++ /branches/bleeding_edge/src/mips/frames-mips.h Tue Jul 30 16:59:55 2013
@@ -228,6 +228,11 @@
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
}
+
+
+inline void StackHandler::SetFp(Address slot, Address fp) {
+ Memory::Address_at(slot) = fp;
+}
} } // namespace v8::internal
=======================================
--- /branches/bleeding_edge/src/x64/frames-x64.h Wed Apr 17 08:36:04 2013
+++ /branches/bleeding_edge/src/x64/frames-x64.h Tue Jul 30 16:59:55 2013
@@ -125,6 +125,12 @@
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
}
+
+
+inline void StackHandler::SetFp(Address slot, Address fp) {
+ Memory::Address_at(slot) = fp;
+}
+
} } // namespace v8::internal
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.