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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 void PopSafepointRegisters() { popad(); } | 146 void PopSafepointRegisters() { popad(); } |
147 // Store the value in register/immediate src in the safepoint | 147 // Store the value in register/immediate src in the safepoint |
148 // register stack slot for register dst. | 148 // register stack slot for register dst. |
149 void StoreToSafepointRegisterSlot(Register dst, Register src); | 149 void StoreToSafepointRegisterSlot(Register dst, Register src); |
150 void StoreToSafepointRegisterSlot(Register dst, Immediate src); | 150 void StoreToSafepointRegisterSlot(Register dst, Immediate src); |
151 void LoadFromSafepointRegisterSlot(Register dst, Register src); | 151 void LoadFromSafepointRegisterSlot(Register dst, Register src); |
152 | 152 |
153 // --------------------------------------------------------------------------- | 153 // --------------------------------------------------------------------------- |
154 // JavaScript invokes | 154 // JavaScript invokes |
155 | 155 |
| 156 // Setup call kind marking in ecx. The method takes ecx as an |
| 157 // explicit first parameter to make the code more readable at the |
| 158 // call sites. |
| 159 void SetCallKind(Register dst, CallKind kind); |
| 160 |
156 // Invoke the JavaScript function code by either calling or jumping. | 161 // Invoke the JavaScript function code by either calling or jumping. |
157 void InvokeCode(const Operand& code, | 162 void InvokeCode(const Operand& code, |
158 const ParameterCount& expected, | 163 const ParameterCount& expected, |
159 const ParameterCount& actual, | 164 const ParameterCount& actual, |
160 InvokeFlag flag, | 165 InvokeFlag flag, |
161 const CallWrapper& call_wrapper = NullCallWrapper()); | 166 const CallWrapper& call_wrapper = NullCallWrapper(), |
| 167 CallKind call_kind = CALL_AS_METHOD); |
162 | 168 |
163 void InvokeCode(Handle<Code> code, | 169 void InvokeCode(Handle<Code> code, |
164 const ParameterCount& expected, | 170 const ParameterCount& expected, |
165 const ParameterCount& actual, | 171 const ParameterCount& actual, |
166 RelocInfo::Mode rmode, | 172 RelocInfo::Mode rmode, |
167 InvokeFlag flag, | 173 InvokeFlag flag, |
168 const CallWrapper& call_wrapper = NullCallWrapper()); | 174 const CallWrapper& call_wrapper = NullCallWrapper(), |
| 175 CallKind call_kind = CALL_AS_METHOD); |
169 | 176 |
170 // Invoke the JavaScript function in the given register. Changes the | 177 // Invoke the JavaScript function in the given register. Changes the |
171 // current context to the context in the function before invoking. | 178 // current context to the context in the function before invoking. |
172 void InvokeFunction(Register function, | 179 void InvokeFunction(Register function, |
173 const ParameterCount& actual, | 180 const ParameterCount& actual, |
174 InvokeFlag flag, | 181 InvokeFlag flag, |
175 const CallWrapper& call_wrapper = NullCallWrapper()); | 182 const CallWrapper& call_wrapper = NullCallWrapper(), |
| 183 CallKind call_kind = CALL_AS_METHOD); |
176 | 184 |
177 void InvokeFunction(JSFunction* function, | 185 void InvokeFunction(JSFunction* function, |
178 const ParameterCount& actual, | 186 const ParameterCount& actual, |
179 InvokeFlag flag, | 187 InvokeFlag flag, |
180 const CallWrapper& call_wrapper = NullCallWrapper()); | 188 const CallWrapper& call_wrapper = NullCallWrapper()); |
181 | 189 |
182 // Invoke specified builtin JavaScript function. Adds an entry to | 190 // Invoke specified builtin JavaScript function. Adds an entry to |
183 // the unresolved list if the name does not resolve. | 191 // the unresolved list if the name does not resolve. |
184 void InvokeBuiltin(Builtins::JavaScript id, | 192 void InvokeBuiltin(Builtins::JavaScript id, |
185 InvokeFlag flag, | 193 InvokeFlag flag, |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 Handle<Object> code_object_; | 651 Handle<Object> code_object_; |
644 | 652 |
645 // Helper functions for generating invokes. | 653 // Helper functions for generating invokes. |
646 void InvokePrologue(const ParameterCount& expected, | 654 void InvokePrologue(const ParameterCount& expected, |
647 const ParameterCount& actual, | 655 const ParameterCount& actual, |
648 Handle<Code> code_constant, | 656 Handle<Code> code_constant, |
649 const Operand& code_operand, | 657 const Operand& code_operand, |
650 Label* done, | 658 Label* done, |
651 InvokeFlag flag, | 659 InvokeFlag flag, |
652 Label::Distance done_near = Label::kFar, | 660 Label::Distance done_near = Label::kFar, |
653 const CallWrapper& call_wrapper = NullCallWrapper()); | 661 const CallWrapper& call_wrapper = NullCallWrapper(), |
| 662 CallKind call_kind = CALL_AS_METHOD); |
654 | 663 |
655 // Activation support. | 664 // Activation support. |
656 void EnterFrame(StackFrame::Type type); | 665 void EnterFrame(StackFrame::Type type); |
657 void LeaveFrame(StackFrame::Type type); | 666 void LeaveFrame(StackFrame::Type type); |
658 | 667 |
659 void EnterExitFramePrologue(); | 668 void EnterExitFramePrologue(); |
660 void EnterExitFrameEpilogue(int argc, bool save_doubles); | 669 void EnterExitFrameEpilogue(int argc, bool save_doubles); |
661 | 670 |
662 void LeaveExitFrameEpilogue(); | 671 void LeaveExitFrameEpilogue(); |
663 | 672 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 } \ | 764 } \ |
756 masm-> | 765 masm-> |
757 #else | 766 #else |
758 #define ACCESS_MASM(masm) masm-> | 767 #define ACCESS_MASM(masm) masm-> |
759 #endif | 768 #endif |
760 | 769 |
761 | 770 |
762 } } // namespace v8::internal | 771 } } // namespace v8::internal |
763 | 772 |
764 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 773 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |