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 3514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3525 // check if we should retry or throw exception | 3525 // check if we should retry or throw exception |
3526 Label retry; | 3526 Label retry; |
3527 __ bind(&failure_returned); | 3527 __ bind(&failure_returned); |
3528 STATIC_ASSERT(Failure::RETRY_AFTER_GC == 0); | 3528 STATIC_ASSERT(Failure::RETRY_AFTER_GC == 0); |
3529 __ tst(r0, Operand(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize)); | 3529 __ tst(r0, Operand(((1 << kFailureTypeTagSize) - 1) << kFailureTagSize)); |
3530 __ b(eq, &retry); | 3530 __ b(eq, &retry); |
3531 | 3531 |
3532 // Special handling of out of memory exceptions. | 3532 // Special handling of out of memory exceptions. |
3533 JumpIfOOM(masm, r0, ip, throw_out_of_memory_exception); | 3533 JumpIfOOM(masm, r0, ip, throw_out_of_memory_exception); |
3534 | 3534 |
3535 // Retrieve the pending exception and clear the variable. | 3535 // Retrieve the pending exception. |
| 3536 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress, |
| 3537 isolate))); |
| 3538 __ ldr(r0, MemOperand(ip)); |
| 3539 |
| 3540 // See if we just retrieved an OOM exception. |
| 3541 JumpIfOOM(masm, r0, ip, throw_out_of_memory_exception); |
| 3542 |
| 3543 // Clear the pending exception. |
3536 __ mov(r3, Operand(isolate->factory()->the_hole_value())); | 3544 __ mov(r3, Operand(isolate->factory()->the_hole_value())); |
3537 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress, | 3545 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress, |
3538 isolate))); | 3546 isolate))); |
3539 __ ldr(r0, MemOperand(ip)); | |
3540 __ str(r3, MemOperand(ip)); | 3547 __ str(r3, MemOperand(ip)); |
3541 | 3548 |
3542 // Special handling of termination exceptions which are uncatchable | 3549 // Special handling of termination exceptions which are uncatchable |
3543 // by javascript code. | 3550 // by javascript code. |
3544 __ cmp(r0, Operand(isolate->factory()->termination_exception())); | 3551 __ cmp(r0, Operand(isolate->factory()->termination_exception())); |
3545 __ b(eq, throw_termination_exception); | 3552 __ b(eq, throw_termination_exception); |
3546 | 3553 |
3547 // Handle normal exception. | 3554 // Handle normal exception. |
3548 __ jmp(throw_normal_exception); | 3555 __ jmp(throw_normal_exception); |
3549 | 3556 |
(...skipping 3968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7518 | 7525 |
7519 __ Pop(lr, r5, r1); | 7526 __ Pop(lr, r5, r1); |
7520 __ Ret(); | 7527 __ Ret(); |
7521 } | 7528 } |
7522 | 7529 |
7523 #undef __ | 7530 #undef __ |
7524 | 7531 |
7525 } } // namespace v8::internal | 7532 } } // namespace v8::internal |
7526 | 7533 |
7527 #endif // V8_TARGET_ARCH_ARM | 7534 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |