OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 void PopSafepointRegisters() { popad(); } | 145 void PopSafepointRegisters() { popad(); } |
146 // Store the value in register/immediate src in the safepoint | 146 // Store the value in register/immediate src in the safepoint |
147 // register stack slot for register dst. | 147 // register stack slot for register dst. |
148 void StoreToSafepointRegisterSlot(Register dst, Register src); | 148 void StoreToSafepointRegisterSlot(Register dst, Register src); |
149 void StoreToSafepointRegisterSlot(Register dst, Immediate src); | 149 void StoreToSafepointRegisterSlot(Register dst, Immediate src); |
150 void LoadFromSafepointRegisterSlot(Register dst, Register src); | 150 void LoadFromSafepointRegisterSlot(Register dst, Register src); |
151 | 151 |
152 // --------------------------------------------------------------------------- | 152 // --------------------------------------------------------------------------- |
153 // JavaScript invokes | 153 // JavaScript invokes |
154 | 154 |
| 155 // Setup implicit/explicit receiver marking in specified register. |
| 156 void SetReceiverType(Register dst, ReceiverType type); |
| 157 |
155 // Invoke the JavaScript function code by either calling or jumping. | 158 // Invoke the JavaScript function code by either calling or jumping. |
156 void InvokeCode(const Operand& code, | 159 void InvokeCode(const Operand& code, |
157 const ParameterCount& expected, | 160 const ParameterCount& expected, |
158 const ParameterCount& actual, | 161 const ParameterCount& actual, |
159 InvokeFlag flag, | 162 InvokeFlag flag, |
160 const CallWrapper& call_wrapper = NullCallWrapper()); | 163 const CallWrapper& call_wrapper = NullCallWrapper(), |
| 164 ReceiverType receiver_type = EXPLICIT_RECEIVER); |
161 | 165 |
162 void InvokeCode(Handle<Code> code, | 166 void InvokeCode(Handle<Code> code, |
163 const ParameterCount& expected, | 167 const ParameterCount& expected, |
164 const ParameterCount& actual, | 168 const ParameterCount& actual, |
165 RelocInfo::Mode rmode, | 169 RelocInfo::Mode rmode, |
166 InvokeFlag flag, | 170 InvokeFlag flag, |
167 const CallWrapper& call_wrapper = NullCallWrapper()); | 171 const CallWrapper& call_wrapper = NullCallWrapper(), |
| 172 ReceiverType receiver_type = EXPLICIT_RECEIVER); |
168 | 173 |
169 // Invoke the JavaScript function in the given register. Changes the | 174 // Invoke the JavaScript function in the given register. Changes the |
170 // current context to the context in the function before invoking. | 175 // current context to the context in the function before invoking. |
171 void InvokeFunction(Register function, | 176 void InvokeFunction(Register function, |
172 const ParameterCount& actual, | 177 const ParameterCount& actual, |
173 InvokeFlag flag, | 178 InvokeFlag flag, |
174 const CallWrapper& call_wrapper = NullCallWrapper()); | 179 const CallWrapper& call_wrapper = NullCallWrapper(), |
| 180 ReceiverType receiver_type = EXPLICIT_RECEIVER); |
175 | 181 |
176 void InvokeFunction(JSFunction* function, | 182 void InvokeFunction(JSFunction* function, |
177 const ParameterCount& actual, | 183 const ParameterCount& actual, |
178 InvokeFlag flag, | 184 InvokeFlag flag, |
179 const CallWrapper& call_wrapper = NullCallWrapper()); | 185 const CallWrapper& call_wrapper = NullCallWrapper()); |
180 | 186 |
181 // Invoke specified builtin JavaScript function. Adds an entry to | 187 // Invoke specified builtin JavaScript function. Adds an entry to |
182 // the unresolved list if the name does not resolve. | 188 // the unresolved list if the name does not resolve. |
183 void InvokeBuiltin(Builtins::JavaScript id, | 189 void InvokeBuiltin(Builtins::JavaScript id, |
184 InvokeFlag flag, | 190 InvokeFlag flag, |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 Handle<Object> code_object_; | 640 Handle<Object> code_object_; |
635 | 641 |
636 // Helper functions for generating invokes. | 642 // Helper functions for generating invokes. |
637 void InvokePrologue(const ParameterCount& expected, | 643 void InvokePrologue(const ParameterCount& expected, |
638 const ParameterCount& actual, | 644 const ParameterCount& actual, |
639 Handle<Code> code_constant, | 645 Handle<Code> code_constant, |
640 const Operand& code_operand, | 646 const Operand& code_operand, |
641 Label* done, | 647 Label* done, |
642 InvokeFlag flag, | 648 InvokeFlag flag, |
643 Label::Distance done_near = Label::kFar, | 649 Label::Distance done_near = Label::kFar, |
644 const CallWrapper& call_wrapper = NullCallWrapper()); | 650 const CallWrapper& call_wrapper = NullCallWrapper(), |
| 651 ReceiverType receiver_type = EXPLICIT_RECEIVER); |
645 | 652 |
646 // Activation support. | 653 // Activation support. |
647 void EnterFrame(StackFrame::Type type); | 654 void EnterFrame(StackFrame::Type type); |
648 void LeaveFrame(StackFrame::Type type); | 655 void LeaveFrame(StackFrame::Type type); |
649 | 656 |
650 void EnterExitFramePrologue(); | 657 void EnterExitFramePrologue(); |
651 void EnterExitFrameEpilogue(int argc, bool save_doubles); | 658 void EnterExitFrameEpilogue(int argc, bool save_doubles); |
652 | 659 |
653 void LeaveExitFrameEpilogue(); | 660 void LeaveExitFrameEpilogue(); |
654 | 661 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 } \ | 753 } \ |
747 masm-> | 754 masm-> |
748 #else | 755 #else |
749 #define ACCESS_MASM(masm) masm-> | 756 #define ACCESS_MASM(masm) masm-> |
750 #endif | 757 #endif |
751 | 758 |
752 | 759 |
753 } } // namespace v8::internal | 760 } } // namespace v8::internal |
754 | 761 |
755 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 762 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |