| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 5424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5435 } | 5435 } |
| 5436 | 5436 |
| 5437 | 5437 |
| 5438 // The number of register that CallApiFunctionAndReturn will need to save on | 5438 // The number of register that CallApiFunctionAndReturn will need to save on |
| 5439 // the stack. The space for these registers need to be allocated in the | 5439 // the stack. The space for these registers need to be allocated in the |
| 5440 // ExitFrame before calling CallApiFunctionAndReturn. | 5440 // ExitFrame before calling CallApiFunctionAndReturn. |
| 5441 static const int kCallApiFunctionSpillSpace = 4; | 5441 static const int kCallApiFunctionSpillSpace = 4; |
| 5442 | 5442 |
| 5443 | 5443 |
| 5444 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { | 5444 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { |
| 5445 return ref0.address() - ref1.address(); | 5445 return static_cast<int>(ref0.address() - ref1.address()); |
| 5446 } | 5446 } |
| 5447 | 5447 |
| 5448 | 5448 |
| 5449 // Calls an API function. Allocates HandleScope, extracts returned value | 5449 // Calls an API function. Allocates HandleScope, extracts returned value |
| 5450 // from handle and propagates exceptions. | 5450 // from handle and propagates exceptions. |
| 5451 // 'stack_space' is the space to be unwound on exit (includes the call JS | 5451 // 'stack_space' is the space to be unwound on exit (includes the call JS |
| 5452 // arguments space and the additional space allocated for the fast call). | 5452 // arguments space and the additional space allocated for the fast call). |
| 5453 // 'spill_offset' is the offset from the stack pointer where | 5453 // 'spill_offset' is the offset from the stack pointer where |
| 5454 // CallApiFunctionAndReturn can spill registers. | 5454 // CallApiFunctionAndReturn can spill registers. |
| 5455 static void CallApiFunctionAndReturn( | 5455 static void CallApiFunctionAndReturn( |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5777 kStackUnwindSpace, NULL, spill_offset, | 5777 kStackUnwindSpace, NULL, spill_offset, |
| 5778 MemOperand(fp, 6 * kPointerSize), NULL); | 5778 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5779 } | 5779 } |
| 5780 | 5780 |
| 5781 | 5781 |
| 5782 #undef __ | 5782 #undef __ |
| 5783 | 5783 |
| 5784 } } // namespace v8::internal | 5784 } } // namespace v8::internal |
| 5785 | 5785 |
| 5786 #endif // V8_TARGET_ARCH_ARM64 | 5786 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |