| 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 4309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4320 // Uncook return address. | 4320 // Uncook return address. |
| 4321 __ pop(edx); | 4321 __ pop(edx); |
| 4322 __ SmiUntag(edx); | 4322 __ SmiUntag(edx); |
| 4323 __ add(Operand(edx), Immediate(masm_->CodeObject())); | 4323 __ add(Operand(edx), Immediate(masm_->CodeObject())); |
| 4324 __ jmp(Operand(edx)); | 4324 __ jmp(Operand(edx)); |
| 4325 } | 4325 } |
| 4326 | 4326 |
| 4327 | 4327 |
| 4328 #undef __ | 4328 #undef __ |
| 4329 | 4329 |
| 4330 #define __ ACCESS_MASM(masm()) |
| 4331 |
| 4332 FullCodeGenerator::NestedStatement* FullCodeGenerator::TryFinally::Exit( |
| 4333 int* stack_depth, |
| 4334 int* context_length) { |
| 4335 // The macros used here must preserve the result register. |
| 4336 |
| 4337 // Because the handler block contains the context of the finally |
| 4338 // code, we can restore it directly from there for the finally code |
| 4339 // rather than iteratively unwinding contexts via their previous |
| 4340 // links. |
| 4341 __ Drop(*stack_depth); // Down to the handler block. |
| 4342 if (*context_length > 0) { |
| 4343 // Restore the context to its dedicated register and the stack. |
| 4344 __ mov(esi, Operand(esp, StackHandlerConstants::kContextOffset)); |
| 4345 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), esi); |
| 4346 } |
| 4347 __ PopTryHandler(); |
| 4348 __ call(finally_entry_); |
| 4349 |
| 4350 *stack_depth = 0; |
| 4351 *context_length = 0; |
| 4352 return previous_; |
| 4353 } |
| 4354 |
| 4355 |
| 4356 #undef __ |
| 4357 |
| 4330 } } // namespace v8::internal | 4358 } } // namespace v8::internal |
| 4331 | 4359 |
| 4332 #endif // V8_TARGET_ARCH_IA32 | 4360 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |