Commit 890c0eac authored by michael_dawson's avatar michael_dawson Committed by Commit bot

PPC: Remove kind field from StackHandler.

Port 15f82138

Original commit message:
This relands commit 96f79568.

This makes the Isolate::Throw logic not depend on a prediction of
whether an exception is caught or uncaught. Such a prediction is
inherently undecidable because a finally block can decide between
consuming or re-throwing an exception depending on arbitray control
flow.

There still is a conservative prediction mechanism in place that
components like the debugger or tracing can use for reporting.

With this change we can get rid of the StackHandler::kind field, a
pre-requisite to do table-based lookups of exception handlers.

R=mbrandy@us.ibm.com, yangguo@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27381}
parent c277e7ef
...@@ -1097,7 +1097,7 @@ void MacroAssembler::PushTryHandler(StackHandler::Kind kind, ...@@ -1097,7 +1097,7 @@ void MacroAssembler::PushTryHandler(StackHandler::Kind kind,
// For the JSEntry handler, we must preserve r1-r7, r0,r8-r12 are available. // For the JSEntry handler, we must preserve r1-r7, r0,r8-r12 are available.
// We want the stack to look like // We want the stack to look like
// sp -> NextOffset // sp -> NextOffset
// state // index
// context // context
// Link the current handler as the next handler. // Link the current handler as the next handler.
...@@ -1107,10 +1107,7 @@ void MacroAssembler::PushTryHandler(StackHandler::Kind kind, ...@@ -1107,10 +1107,7 @@ void MacroAssembler::PushTryHandler(StackHandler::Kind kind,
// Set this new handler as the current one. // Set this new handler as the current one.
StoreP(sp, MemOperand(r8)); StoreP(sp, MemOperand(r8));
unsigned state = StackHandler::IndexField::encode(handler_index) | mov(r8, Operand(handler_index));
StackHandler::KindField::encode(kind);
LoadIntLiteral(r8, state);
if (kind == StackHandler::JS_ENTRY) { if (kind == StackHandler::JS_ENTRY) {
LoadSmiLiteral(cp, Smi::FromInt(0)); // Indicates no context. LoadSmiLiteral(cp, Smi::FromInt(0)); // Indicates no context.
} }
......
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