| 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 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ | 5 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ |
| 6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ | 6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
| 10 #include "src/base/flags.h" | 10 #include "src/base/flags.h" |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 ExternalReference::roots_array_start(isolate()); | 365 ExternalReference::roots_array_start(isolate()); |
| 366 Move(kRootRegister, roots_array_start); | 366 Move(kRootRegister, roots_array_start); |
| 367 addp(kRootRegister, Immediate(kRootRegisterBias)); | 367 addp(kRootRegister, Immediate(kRootRegisterBias)); |
| 368 } | 368 } |
| 369 | 369 |
| 370 // --------------------------------------------------------------------------- | 370 // --------------------------------------------------------------------------- |
| 371 // JavaScript invokes | 371 // JavaScript invokes |
| 372 | 372 |
| 373 // Invoke the JavaScript function code by either calling or jumping. | 373 // Invoke the JavaScript function code by either calling or jumping. |
| 374 void InvokeCode(Register code, | 374 void InvokeCode(Register code, |
| 375 Register new_target, |
| 375 const ParameterCount& expected, | 376 const ParameterCount& expected, |
| 376 const ParameterCount& actual, | 377 const ParameterCount& actual, |
| 377 InvokeFlag flag, | 378 InvokeFlag flag, |
| 378 const CallWrapper& call_wrapper); | 379 const CallWrapper& call_wrapper); |
| 379 | 380 |
| 380 // Invoke the JavaScript function in the given register. Changes the | 381 // Invoke the JavaScript function in the given register. Changes the |
| 381 // current context to the context in the function before invoking. | 382 // current context to the context in the function before invoking. |
| 382 void InvokeFunction(Register function, | 383 void InvokeFunction(Register function, |
| 384 Register new_target, |
| 383 const ParameterCount& actual, | 385 const ParameterCount& actual, |
| 384 InvokeFlag flag, | 386 InvokeFlag flag, |
| 385 const CallWrapper& call_wrapper); | 387 const CallWrapper& call_wrapper); |
| 386 | 388 |
| 387 void InvokeFunction(Register function, | 389 void InvokeFunction(Register function, |
| 390 Register new_target, |
| 388 const ParameterCount& expected, | 391 const ParameterCount& expected, |
| 389 const ParameterCount& actual, | 392 const ParameterCount& actual, |
| 390 InvokeFlag flag, | 393 InvokeFlag flag, |
| 391 const CallWrapper& call_wrapper); | 394 const CallWrapper& call_wrapper); |
| 392 | 395 |
| 393 void InvokeFunction(Handle<JSFunction> function, | 396 void InvokeFunction(Handle<JSFunction> function, |
| 394 const ParameterCount& expected, | 397 const ParameterCount& expected, |
| 395 const ParameterCount& actual, | 398 const ParameterCount& actual, |
| 396 InvokeFlag flag, | 399 InvokeFlag flag, |
| 397 const CallWrapper& call_wrapper); | 400 const CallWrapper& call_wrapper); |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 | 1584 |
| 1582 // This handle will be patched with the code object on installation. | 1585 // This handle will be patched with the code object on installation. |
| 1583 Handle<Object> code_object_; | 1586 Handle<Object> code_object_; |
| 1584 | 1587 |
| 1585 // Helper functions for generating invokes. | 1588 // Helper functions for generating invokes. |
| 1586 void InvokePrologue(const ParameterCount& expected, | 1589 void InvokePrologue(const ParameterCount& expected, |
| 1587 const ParameterCount& actual, | 1590 const ParameterCount& actual, |
| 1588 Label* done, | 1591 Label* done, |
| 1589 bool* definitely_mismatches, | 1592 bool* definitely_mismatches, |
| 1590 InvokeFlag flag, | 1593 InvokeFlag flag, |
| 1591 Label::Distance near_jump = Label::kFar, | 1594 Label::Distance near_jump, |
| 1592 const CallWrapper& call_wrapper = NullCallWrapper()); | 1595 const CallWrapper& call_wrapper); |
| 1593 | 1596 |
| 1594 void EnterExitFramePrologue(bool save_rax); | 1597 void EnterExitFramePrologue(bool save_rax); |
| 1595 | 1598 |
| 1596 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack | 1599 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack |
| 1597 // accessible via StackSpaceOperand. | 1600 // accessible via StackSpaceOperand. |
| 1598 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles); | 1601 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles); |
| 1599 | 1602 |
| 1600 void LeaveExitFrameEpilogue(bool restore_context); | 1603 void LeaveExitFrameEpilogue(bool restore_context); |
| 1601 | 1604 |
| 1602 // Allocation support helpers. | 1605 // Allocation support helpers. |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1731 } \ | 1734 } \ |
| 1732 masm-> | 1735 masm-> |
| 1733 #else | 1736 #else |
| 1734 #define ACCESS_MASM(masm) masm-> | 1737 #define ACCESS_MASM(masm) masm-> |
| 1735 #endif | 1738 #endif |
| 1736 | 1739 |
| 1737 } // namespace internal | 1740 } // namespace internal |
| 1738 } // namespace v8 | 1741 } // namespace v8 |
| 1739 | 1742 |
| 1740 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1743 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |