Commit c1cf472f authored by chunyang.dai's avatar chunyang.dai Committed by Commit bot

X87: Remove frame pointer from StackHandler.

port 36e69a91 (r27115)

original commit message:

 This reduces the size of the StackHandler by yet another word. We no
 longer need to keep track of the frame pointer, as the stack walk will
 be able to recalculate it.

BUG=

Review URL: https://codereview.chromium.org/1030563002

Cr-Commit-Position: refs/heads/master@{#27357}
parent 113037d9
...@@ -990,22 +990,16 @@ void MacroAssembler::LeaveApiExitFrame(bool restore_context) { ...@@ -990,22 +990,16 @@ void MacroAssembler::LeaveApiExitFrame(bool restore_context) {
void MacroAssembler::PushTryHandler(StackHandler::Kind kind, void MacroAssembler::PushTryHandler(StackHandler::Kind kind,
int handler_index) { int handler_index) {
// Adjust this code if not the case. // Adjust this code if not the case.
STATIC_ASSERT(StackHandlerConstants::kSize == 4 * kPointerSize); STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize);
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize); STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize);
STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize); STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize);
STATIC_ASSERT(StackHandlerConstants::kFPOffset == 3 * kPointerSize);
// We will build up the handler from the bottom by pushing on the stack. // We will build up the handler from the bottom by pushing on the stack.
// First push the frame pointer and context. // First push the context.
if (kind == StackHandler::JS_ENTRY) { if (kind == StackHandler::JS_ENTRY) {
// The frame pointer does not point to a JS frame so we save NULL for
// ebp. We expect the code throwing an exception to check ebp before
// dereferencing it to restore the context.
push(Immediate(0)); // NULL frame pointer.
push(Immediate(Smi::FromInt(0))); // No context. push(Immediate(Smi::FromInt(0))); // No context.
} else { } else {
push(ebp);
push(esi); push(esi);
} }
// Push the state. // Push the state.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment