| 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 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 Comment cmnt(masm_, "[ Throw"); | 1329 Comment cmnt(masm_, "[ Throw"); |
| 1330 // Throw has no effect on the stack height or the current expression context. | 1330 // Throw has no effect on the stack height or the current expression context. |
| 1331 // Usually the expression context is null, because throw is a statement. | 1331 // Usually the expression context is null, because throw is a statement. |
| 1332 VisitForStackValue(expr->exception()); | 1332 VisitForStackValue(expr->exception()); |
| 1333 __ CallRuntime(Runtime::kThrow, 1); | 1333 __ CallRuntime(Runtime::kThrow, 1); |
| 1334 decrement_stack_height(); | 1334 decrement_stack_height(); |
| 1335 // Never returns here. | 1335 // Never returns here. |
| 1336 } | 1336 } |
| 1337 | 1337 |
| 1338 | 1338 |
| 1339 FullCodeGenerator::NestedStatement* FullCodeGenerator::TryFinally::Exit( | |
| 1340 int* stack_depth, | |
| 1341 int* context_length) { | |
| 1342 // The macros used here must preserve the result register. | |
| 1343 __ Drop(*stack_depth); | |
| 1344 __ PopTryHandler(); | |
| 1345 *stack_depth = 0; | |
| 1346 | |
| 1347 Register context = FullCodeGenerator::context_register(); | |
| 1348 while (*context_length > 0) { | |
| 1349 codegen_->LoadContextField(context, Context::PREVIOUS_INDEX); | |
| 1350 --(*context_length); | |
| 1351 } | |
| 1352 | |
| 1353 __ Call(finally_entry_); | |
| 1354 return previous_; | |
| 1355 } | |
| 1356 | |
| 1357 | |
| 1358 FullCodeGenerator::NestedStatement* FullCodeGenerator::TryCatch::Exit( | 1339 FullCodeGenerator::NestedStatement* FullCodeGenerator::TryCatch::Exit( |
| 1359 int* stack_depth, | 1340 int* stack_depth, |
| 1360 int* context_length) { | 1341 int* context_length) { |
| 1361 // The macros used here must preserve the result register. | 1342 // The macros used here must preserve the result register. |
| 1362 __ Drop(*stack_depth); | 1343 __ Drop(*stack_depth); |
| 1363 __ PopTryHandler(); | 1344 __ PopTryHandler(); |
| 1364 *stack_depth = 0; | 1345 *stack_depth = 0; |
| 1365 return previous_; | 1346 return previous_; |
| 1366 } | 1347 } |
| 1367 | 1348 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1383 } | 1364 } |
| 1384 | 1365 |
| 1385 return false; | 1366 return false; |
| 1386 } | 1367 } |
| 1387 | 1368 |
| 1388 | 1369 |
| 1389 #undef __ | 1370 #undef __ |
| 1390 | 1371 |
| 1391 | 1372 |
| 1392 } } // namespace v8::internal | 1373 } } // namespace v8::internal |
| OLD | NEW |