| 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 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1236 } | 1236 } |
| 1237 // Restore the context. | 1237 // Restore the context. |
| 1238 LoadContextField(context_register(), Context::PREVIOUS_INDEX); | 1238 LoadContextField(context_register(), Context::PREVIOUS_INDEX); |
| 1239 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); | 1239 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); |
| 1240 scope_ = saved_scope; | 1240 scope_ = saved_scope; |
| 1241 __ jmp(&exit); | 1241 __ jmp(&exit); |
| 1242 | 1242 |
| 1243 // Try block code. Sets up the exception handler chain. | 1243 // Try block code. Sets up the exception handler chain. |
| 1244 __ bind(&try_entry); | 1244 __ bind(&try_entry); |
| 1245 __ PushTryHandler(StackHandler::CATCH, stmt->index()); | 1245 __ PushTryHandler(StackHandler::CATCH, stmt->index()); |
| 1246 PrepareForBailoutForId(stmt->TryEntryId(), NO_REGISTERS); |
| 1246 { TryCatch try_body(this); | 1247 { TryCatch try_body(this); |
| 1247 Visit(stmt->try_block()); | 1248 Visit(stmt->try_block()); |
| 1248 } | 1249 } |
| 1249 __ PopTryHandler(); | 1250 __ PopTryHandler(); |
| 1251 PrepareForBailoutForId(stmt->TryExitId(), NO_REGISTERS); |
| 1250 __ bind(&exit); | 1252 __ bind(&exit); |
| 1251 } | 1253 } |
| 1252 | 1254 |
| 1253 | 1255 |
| 1254 void FullCodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* stmt) { | 1256 void FullCodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* stmt) { |
| 1255 Comment cmnt(masm_, "[ TryFinallyStatement"); | 1257 Comment cmnt(masm_, "[ TryFinallyStatement"); |
| 1256 SetStatementPosition(stmt); | 1258 SetStatementPosition(stmt); |
| 1257 // Try finally is compiled by setting up a try-handler on the stack while | 1259 // Try finally is compiled by setting up a try-handler on the stack while |
| 1258 // executing the try body, and removing it again afterwards. | 1260 // executing the try body, and removing it again afterwards. |
| 1259 // | 1261 // |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1421 } | 1423 } |
| 1422 | 1424 |
| 1423 return false; | 1425 return false; |
| 1424 } | 1426 } |
| 1425 | 1427 |
| 1426 | 1428 |
| 1427 #undef __ | 1429 #undef __ |
| 1428 | 1430 |
| 1429 | 1431 |
| 1430 } } // namespace v8::internal | 1432 } } // namespace v8::internal |
| OLD | NEW |