OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 | 1162 |
1163 // Invoke: Link this frame into the handler chain. | 1163 // Invoke: Link this frame into the handler chain. |
1164 __ bind(&invoke); | 1164 __ bind(&invoke); |
1165 // Must preserve r3-r7. | 1165 // Must preserve r3-r7. |
1166 __ PushStackHandler(); | 1166 __ PushStackHandler(); |
1167 // If an exception not caught by another handler occurs, this handler | 1167 // If an exception not caught by another handler occurs, this handler |
1168 // returns control to the code after the b(&invoke) above, which | 1168 // returns control to the code after the b(&invoke) above, which |
1169 // restores all kCalleeSaved registers (including cp and fp) to their | 1169 // restores all kCalleeSaved registers (including cp and fp) to their |
1170 // saved values before returning a failure to C. | 1170 // saved values before returning a failure to C. |
1171 | 1171 |
1172 // Clear any pending exceptions. | |
1173 __ mov(r8, Operand(isolate()->factory()->the_hole_value())); | |
1174 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress, | |
1175 isolate()))); | |
1176 __ StoreP(r8, MemOperand(ip)); | |
1177 | |
1178 // Invoke the function by calling through JS entry trampoline builtin. | 1172 // Invoke the function by calling through JS entry trampoline builtin. |
1179 // Notice that we cannot store a reference to the trampoline code directly in | 1173 // Notice that we cannot store a reference to the trampoline code directly in |
1180 // this stub, because runtime stubs are not traversed when doing GC. | 1174 // this stub, because runtime stubs are not traversed when doing GC. |
1181 | 1175 |
1182 // Expected registers by Builtins::JSEntryTrampoline | 1176 // Expected registers by Builtins::JSEntryTrampoline |
1183 // r3: code entry | 1177 // r3: code entry |
1184 // r4: function | 1178 // r4: function |
1185 // r5: receiver | 1179 // r5: receiver |
1186 // r6: argc | 1180 // r6: argc |
1187 // r7: argv | 1181 // r7: argv |
(...skipping 4290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5478 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); | 5472 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); |
5479 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5473 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5480 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5474 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5481 } | 5475 } |
5482 | 5476 |
5483 #undef __ | 5477 #undef __ |
5484 } // namespace internal | 5478 } // namespace internal |
5485 } // namespace v8 | 5479 } // namespace v8 |
5486 | 5480 |
5487 #endif // V8_TARGET_ARCH_PPC | 5481 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |