| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1423 } | 1423 } |
| 1424 // Restore the context. | 1424 // Restore the context. |
| 1425 LoadContextField(context_register(), Context::PREVIOUS_INDEX); | 1425 LoadContextField(context_register(), Context::PREVIOUS_INDEX); |
| 1426 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); | 1426 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); |
| 1427 scope_ = saved_scope; | 1427 scope_ = saved_scope; |
| 1428 __ jmp(&exit); | 1428 __ jmp(&exit); |
| 1429 | 1429 |
| 1430 // Try block code. Sets up the exception handler chain. | 1430 // Try block code. Sets up the exception handler chain. |
| 1431 __ bind(&try_entry); | 1431 __ bind(&try_entry); |
| 1432 __ PushTryHandler(StackHandler::CATCH, stmt->index()); | 1432 __ PushTryHandler(StackHandler::CATCH, stmt->index()); |
| 1433 PrepareForBailoutForId(stmt->TryEntryId(), NO_REGISTERS); |
| 1433 { TryCatch try_body(this); | 1434 { TryCatch try_body(this); |
| 1434 Visit(stmt->try_block()); | 1435 Visit(stmt->try_block()); |
| 1435 } | 1436 } |
| 1436 __ PopTryHandler(); | 1437 __ PopTryHandler(); |
| 1438 PrepareForBailoutForId(stmt->TryExitId(), NO_REGISTERS); |
| 1437 __ bind(&exit); | 1439 __ bind(&exit); |
| 1438 } | 1440 } |
| 1439 | 1441 |
| 1440 | 1442 |
| 1441 void FullCodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* stmt) { | 1443 void FullCodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* stmt) { |
| 1442 Comment cmnt(masm_, "[ TryFinallyStatement"); | 1444 Comment cmnt(masm_, "[ TryFinallyStatement"); |
| 1443 SetStatementPosition(stmt); | 1445 SetStatementPosition(stmt); |
| 1444 // Try finally is compiled by setting up a try-handler on the stack while | 1446 // Try finally is compiled by setting up a try-handler on the stack while |
| 1445 // executing the try body, and removing it again afterwards. | 1447 // executing the try body, and removing it again afterwards. |
| 1446 // | 1448 // |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1608 } | 1610 } |
| 1609 | 1611 |
| 1610 return false; | 1612 return false; |
| 1611 } | 1613 } |
| 1612 | 1614 |
| 1613 | 1615 |
| 1614 #undef __ | 1616 #undef __ |
| 1615 | 1617 |
| 1616 | 1618 |
| 1617 } } // namespace v8::internal | 1619 } } // namespace v8::internal |
| OLD | NEW |