| 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_X87_MACRO_ASSEMBLER_X87_H_ | 5 #ifndef V8_X87_MACRO_ASSEMBLER_X87_H_ |
| 6 #define V8_X87_MACRO_ASSEMBLER_X87_H_ | 6 #define V8_X87_MACRO_ASSEMBLER_X87_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/frames.h" | 10 #include "src/frames.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 325 |
| 326 // --------------------------------------------------------------------------- | 326 // --------------------------------------------------------------------------- |
| 327 // JavaScript invokes | 327 // JavaScript invokes |
| 328 | 328 |
| 329 // Invoke the JavaScript function code by either calling or jumping. | 329 // Invoke the JavaScript function code by either calling or jumping. |
| 330 void InvokeCode(Register code, | 330 void InvokeCode(Register code, |
| 331 const ParameterCount& expected, | 331 const ParameterCount& expected, |
| 332 const ParameterCount& actual, | 332 const ParameterCount& actual, |
| 333 InvokeFlag flag, | 333 InvokeFlag flag, |
| 334 const CallWrapper& call_wrapper) { | 334 const CallWrapper& call_wrapper) { |
| 335 InvokeCode(Operand(code), expected, actual, flag, call_wrapper); | 335 InvokeCode(Operand(code), no_reg, expected, actual, flag, call_wrapper); |
| 336 } | 336 } |
| 337 | 337 |
| 338 void InvokeCode(const Operand& code, | 338 void InvokeCode(const Operand& code, Register new_target, |
| 339 const ParameterCount& expected, | 339 const ParameterCount& expected, const ParameterCount& actual, |
| 340 const ParameterCount& actual, | 340 InvokeFlag flag, const CallWrapper& call_wrapper); |
| 341 InvokeFlag flag, | |
| 342 const CallWrapper& call_wrapper); | |
| 343 | 341 |
| 344 // Invoke the JavaScript function in the given register. Changes the | 342 // Invoke the JavaScript function in the given register. Changes the |
| 345 // current context to the context in the function before invoking. | 343 // current context to the context in the function before invoking. |
| 346 void InvokeFunction(Register function, | 344 void InvokeFunction(Register function, Register new_target, |
| 347 const ParameterCount& actual, | 345 const ParameterCount& actual, InvokeFlag flag, |
| 348 InvokeFlag flag, | |
| 349 const CallWrapper& call_wrapper); | 346 const CallWrapper& call_wrapper); |
| 350 | 347 |
| 351 void InvokeFunction(Register function, | 348 void InvokeFunction(Register function, |
| 352 const ParameterCount& expected, | 349 const ParameterCount& expected, |
| 353 const ParameterCount& actual, | 350 const ParameterCount& actual, |
| 354 InvokeFlag flag, | 351 InvokeFlag flag, |
| 355 const CallWrapper& call_wrapper); | 352 const CallWrapper& call_wrapper); |
| 356 | 353 |
| 357 void InvokeFunction(Handle<JSFunction> function, | 354 void InvokeFunction(Handle<JSFunction> function, |
| 358 const ParameterCount& expected, | 355 const ParameterCount& expected, |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 Register scratch1, Label* found); | 949 Register scratch1, Label* found); |
| 953 | 950 |
| 954 private: | 951 private: |
| 955 bool generating_stub_; | 952 bool generating_stub_; |
| 956 bool has_frame_; | 953 bool has_frame_; |
| 957 // This handle will be patched with the code object on installation. | 954 // This handle will be patched with the code object on installation. |
| 958 Handle<Object> code_object_; | 955 Handle<Object> code_object_; |
| 959 | 956 |
| 960 // Helper functions for generating invokes. | 957 // Helper functions for generating invokes. |
| 961 void InvokePrologue(const ParameterCount& expected, | 958 void InvokePrologue(const ParameterCount& expected, |
| 962 const ParameterCount& actual, | 959 const ParameterCount& actual, Label* done, |
| 963 Label* done, | 960 bool* definitely_mismatches, InvokeFlag flag, |
| 964 bool* definitely_mismatches, | |
| 965 InvokeFlag flag, | |
| 966 Label::Distance done_distance, | 961 Label::Distance done_distance, |
| 967 const CallWrapper& call_wrapper = NullCallWrapper()); | 962 const CallWrapper& call_wrapper); |
| 968 | 963 |
| 969 void EnterExitFramePrologue(); | 964 void EnterExitFramePrologue(); |
| 970 void EnterExitFrameEpilogue(int argc, bool save_doubles); | 965 void EnterExitFrameEpilogue(int argc, bool save_doubles); |
| 971 | 966 |
| 972 void LeaveExitFrameEpilogue(bool restore_context); | 967 void LeaveExitFrameEpilogue(bool restore_context); |
| 973 | 968 |
| 974 // Allocation support helpers. | 969 // Allocation support helpers. |
| 975 void LoadAllocationTopHelper(Register result, | 970 void LoadAllocationTopHelper(Register result, |
| 976 Register scratch, | 971 Register scratch, |
| 977 AllocationFlags flags); | 972 AllocationFlags flags); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 masm-> | 1080 masm-> |
| 1086 #else | 1081 #else |
| 1087 #define ACCESS_MASM(masm) masm-> | 1082 #define ACCESS_MASM(masm) masm-> |
| 1088 #endif | 1083 #endif |
| 1089 | 1084 |
| 1090 | 1085 |
| 1091 } // namespace internal | 1086 } // namespace internal |
| 1092 } // namespace v8 | 1087 } // namespace v8 |
| 1093 | 1088 |
| 1094 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ | 1089 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ |
| OLD | NEW |