| Index: src/arm/macro-assembler-arm.cc
|
| diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
|
| index c92b94381791b44f86d0b1cebb03e3ab9a2ce2ac..2f0e5fa45978f66813d03aaf512afdb794013d92 100644
|
| --- a/src/arm/macro-assembler-arm.cc
|
| +++ b/src/arm/macro-assembler-arm.cc
|
| @@ -1188,8 +1188,7 @@ void MacroAssembler::DebugBreak() {
|
| #endif
|
|
|
|
|
| -void MacroAssembler::PushTryHandler(CodeLocation try_location,
|
| - HandlerType type,
|
| +void MacroAssembler::PushTryHandler(StackHandler::Kind kind,
|
| int handler_index) {
|
| // Adjust this code if not the case.
|
| STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize);
|
| @@ -1201,28 +1200,20 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location,
|
|
|
| // For the JSEntry handler, we must preserve r0-r4, r5-r7 are available.
|
| // We will build up the handler from the bottom by pushing on the stack.
|
| - // First compute the state.
|
| - unsigned state = StackHandler::OffsetField::encode(handler_index);
|
| - if (try_location == IN_JAVASCRIPT) {
|
| - state |= (type == TRY_CATCH_HANDLER)
|
| - ? StackHandler::KindField::encode(StackHandler::TRY_CATCH)
|
| - : StackHandler::KindField::encode(StackHandler::TRY_FINALLY);
|
| - } else {
|
| - ASSERT(try_location == IN_JS_ENTRY);
|
| - state |= StackHandler::KindField::encode(StackHandler::ENTRY);
|
| - }
|
| -
|
| // Set up the code object (r5) and the state (r6) for pushing.
|
| + unsigned state =
|
| + StackHandler::IndexField::encode(handler_index) |
|
| + StackHandler::KindField::encode(kind);
|
| mov(r5, Operand(CodeObject()));
|
| mov(r6, Operand(state));
|
|
|
| // Push the frame pointer, context, state, and code object.
|
| - if (try_location == IN_JAVASCRIPT) {
|
| - stm(db_w, sp, r5.bit() | r6.bit() | cp.bit() | fp.bit());
|
| - } else {
|
| + if (kind == StackHandler::JS_ENTRY) {
|
| mov(r7, Operand(Smi::FromInt(0))); // Indicates no context.
|
| mov(ip, Operand(0, RelocInfo::NONE)); // NULL frame pointer.
|
| stm(db_w, sp, r5.bit() | r6.bit() | r7.bit() | ip.bit());
|
| + } else {
|
| + stm(db_w, sp, r5.bit() | r6.bit() | cp.bit() | fp.bit());
|
| }
|
|
|
| // Link the current handler as the next handler.
|
| @@ -1330,7 +1321,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type,
|
| ldr(sp, MemOperand(sp, StackHandlerConstants::kNextOffset));
|
|
|
| bind(&check_kind);
|
| - STATIC_ASSERT(StackHandler::ENTRY == 0);
|
| + STATIC_ASSERT(StackHandler::JS_ENTRY == 0);
|
| ldr(r2, MemOperand(sp, StackHandlerConstants::kStateOffset));
|
| tst(r2, Operand(StackHandler::KindField::kMask));
|
| b(ne, &fetch_next);
|
|
|