| 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 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2425 } | 2425 } |
| 2426 // LeaveExitFrame expects unwind space to be in a register. | 2426 // LeaveExitFrame expects unwind space to be in a register. |
| 2427 mov(r4, Operand(stack_space)); | 2427 mov(r4, Operand(stack_space)); |
| 2428 LeaveExitFrame(false, r4, !restore_context); | 2428 LeaveExitFrame(false, r4, !restore_context); |
| 2429 mov(pc, lr); | 2429 mov(pc, lr); |
| 2430 | 2430 |
| 2431 bind(&promote_scheduled_exception); | 2431 bind(&promote_scheduled_exception); |
| 2432 { | 2432 { |
| 2433 FrameScope frame(this, StackFrame::INTERNAL); | 2433 FrameScope frame(this, StackFrame::INTERNAL); |
| 2434 CallExternalReference( | 2434 CallExternalReference( |
| 2435 ExternalReference(Runtime::kPromoteScheduledException, isolate()), | 2435 ExternalReference(Runtime::kHiddenPromoteScheduledException, isolate()), |
| 2436 0); | 2436 0); |
| 2437 } | 2437 } |
| 2438 jmp(&exception_handled); | 2438 jmp(&exception_handled); |
| 2439 | 2439 |
| 2440 // HandleScope limit has changed. Delete allocated extensions. | 2440 // HandleScope limit has changed. Delete allocated extensions. |
| 2441 bind(&delete_allocated_handles); | 2441 bind(&delete_allocated_handles); |
| 2442 str(r5, MemOperand(r9, kLimitOffset)); | 2442 str(r5, MemOperand(r9, kLimitOffset)); |
| 2443 mov(r4, r0); | 2443 mov(r4, r0); |
| 2444 PrepareCallCFunction(1, r5); | 2444 PrepareCallCFunction(1, r5); |
| 2445 mov(r0, Operand(ExternalReference::isolate_address(isolate()))); | 2445 mov(r0, Operand(ExternalReference::isolate_address(isolate()))); |
| (...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3839 } | 3839 } |
| 3840 #endif | 3840 #endif |
| 3841 | 3841 |
| 3842 mov(r0, Operand(Smi::FromInt(reason))); | 3842 mov(r0, Operand(Smi::FromInt(reason))); |
| 3843 push(r0); | 3843 push(r0); |
| 3844 // Disable stub call restrictions to always allow calls to throw. | 3844 // Disable stub call restrictions to always allow calls to throw. |
| 3845 if (!has_frame_) { | 3845 if (!has_frame_) { |
| 3846 // We don't actually want to generate a pile of code for this, so just | 3846 // We don't actually want to generate a pile of code for this, so just |
| 3847 // claim there is a stack frame, without generating one. | 3847 // claim there is a stack frame, without generating one. |
| 3848 FrameScope scope(this, StackFrame::NONE); | 3848 FrameScope scope(this, StackFrame::NONE); |
| 3849 CallRuntime(Runtime::kThrowMessage, 1); | 3849 CallRuntime(Runtime::kHiddenThrowMessage, 1); |
| 3850 } else { | 3850 } else { |
| 3851 CallRuntime(Runtime::kThrowMessage, 1); | 3851 CallRuntime(Runtime::kHiddenThrowMessage, 1); |
| 3852 } | 3852 } |
| 3853 // will not return here | 3853 // will not return here |
| 3854 if (is_const_pool_blocked()) { | 3854 if (is_const_pool_blocked()) { |
| 3855 // If the calling code cares throw the exact number of | 3855 // If the calling code cares throw the exact number of |
| 3856 // instructions generated, we insert padding here to keep the size | 3856 // instructions generated, we insert padding here to keep the size |
| 3857 // of the ThrowMessage macro constant. | 3857 // of the ThrowMessage macro constant. |
| 3858 static const int kExpectedThrowMessageInstructions = 10; | 3858 static const int kExpectedThrowMessageInstructions = 10; |
| 3859 int throw_instructions = InstructionsGeneratedSince(&throw_start); | 3859 int throw_instructions = InstructionsGeneratedSince(&throw_start); |
| 3860 ASSERT(throw_instructions <= kExpectedThrowMessageInstructions); | 3860 ASSERT(throw_instructions <= kExpectedThrowMessageInstructions); |
| 3861 while (throw_instructions++ < kExpectedThrowMessageInstructions) { | 3861 while (throw_instructions++ < kExpectedThrowMessageInstructions) { |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4092 sub(result, result, Operand(dividend)); | 4092 sub(result, result, Operand(dividend)); |
| 4093 } | 4093 } |
| 4094 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); | 4094 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); |
| 4095 add(result, result, Operand(dividend, LSR, 31)); | 4095 add(result, result, Operand(dividend, LSR, 31)); |
| 4096 } | 4096 } |
| 4097 | 4097 |
| 4098 | 4098 |
| 4099 } } // namespace v8::internal | 4099 } } // namespace v8::internal |
| 4100 | 4100 |
| 4101 #endif // V8_TARGET_ARCH_ARM | 4101 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |