OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 | 1098 |
1099 // Invoke: Link this frame into the handler chain. | 1099 // Invoke: Link this frame into the handler chain. |
1100 __ bind(&invoke); | 1100 __ bind(&invoke); |
1101 // Must preserve r0-r4, r5-r6 are available. | 1101 // Must preserve r0-r4, r5-r6 are available. |
1102 __ PushStackHandler(); | 1102 __ PushStackHandler(); |
1103 // If an exception not caught by another handler occurs, this handler | 1103 // If an exception not caught by another handler occurs, this handler |
1104 // returns control to the code after the bl(&invoke) above, which | 1104 // returns control to the code after the bl(&invoke) above, which |
1105 // restores all kCalleeSaved registers (including cp and fp) to their | 1105 // restores all kCalleeSaved registers (including cp and fp) to their |
1106 // saved values before returning a failure to C. | 1106 // saved values before returning a failure to C. |
1107 | 1107 |
1108 // Clear any pending exceptions. | |
1109 __ mov(r5, Operand(isolate()->factory()->the_hole_value())); | |
1110 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress, | |
1111 isolate()))); | |
1112 __ str(r5, MemOperand(ip)); | |
1113 | |
1114 // Invoke the function by calling through JS entry trampoline builtin. | 1108 // Invoke the function by calling through JS entry trampoline builtin. |
1115 // Notice that we cannot store a reference to the trampoline code directly in | 1109 // Notice that we cannot store a reference to the trampoline code directly in |
1116 // this stub, because runtime stubs are not traversed when doing GC. | 1110 // this stub, because runtime stubs are not traversed when doing GC. |
1117 | 1111 |
1118 // Expected registers by Builtins::JSEntryTrampoline | 1112 // Expected registers by Builtins::JSEntryTrampoline |
1119 // r0: code entry | 1113 // r0: code entry |
1120 // r1: function | 1114 // r1: function |
1121 // r2: receiver | 1115 // r2: receiver |
1122 // r3: argc | 1116 // r3: argc |
1123 // r4: argv | 1117 // r4: argv |
(...skipping 4096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5220 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5214 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5221 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5215 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5222 } | 5216 } |
5223 | 5217 |
5224 #undef __ | 5218 #undef __ |
5225 | 5219 |
5226 } // namespace internal | 5220 } // namespace internal |
5227 } // namespace v8 | 5221 } // namespace v8 |
5228 | 5222 |
5229 #endif // V8_TARGET_ARCH_ARM | 5223 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |