OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4285 // Uncook return address and return. | 4285 // Uncook return address and return. |
4286 __ pop(result_register()); | 4286 __ pop(result_register()); |
4287 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); | 4287 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); |
4288 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 4288 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
4289 __ add(pc, r1, Operand(masm_->CodeObject())); | 4289 __ add(pc, r1, Operand(masm_->CodeObject())); |
4290 } | 4290 } |
4291 | 4291 |
4292 | 4292 |
4293 #undef __ | 4293 #undef __ |
4294 | 4294 |
| 4295 #define __ ACCESS_MASM(masm()) |
| 4296 |
| 4297 FullCodeGenerator::NestedStatement* FullCodeGenerator::TryFinally::Exit( |
| 4298 int* stack_depth, |
| 4299 int* context_length) { |
| 4300 // The macros used here must preserve the result register. |
| 4301 |
| 4302 // Because the handler block contains the context of the finally |
| 4303 // code, we can restore it directly from there for the finally code |
| 4304 // rather than iteratively unwinding contexts via their previous |
| 4305 // links. |
| 4306 __ Drop(*stack_depth); // Down to the handler block. |
| 4307 if (*context_length > 0) { |
| 4308 // Restore the context to its dedicated register and the stack. |
| 4309 __ ldr(cp, MemOperand(sp, StackHandlerConstants::kContextOffset)); |
| 4310 __ str(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 4311 } |
| 4312 __ PopTryHandler(); |
| 4313 __ bl(finally_entry_); |
| 4314 |
| 4315 *stack_depth = 0; |
| 4316 *context_length = 0; |
| 4317 return previous_; |
| 4318 } |
| 4319 |
| 4320 |
| 4321 #undef __ |
| 4322 |
4295 } } // namespace v8::internal | 4323 } } // namespace v8::internal |
4296 | 4324 |
4297 #endif // V8_TARGET_ARCH_ARM | 4325 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |