OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 // --------------------------------------------------------------------------- | 126 // --------------------------------------------------------------------------- |
127 // JavaScript invokes | 127 // JavaScript invokes |
128 | 128 |
129 // Invoke the JavaScript function code by either calling or jumping. | 129 // Invoke the JavaScript function code by either calling or jumping. |
130 void InvokeCode(Register code, | 130 void InvokeCode(Register code, |
131 const ParameterCount& expected, | 131 const ParameterCount& expected, |
132 const ParameterCount& actual, | 132 const ParameterCount& actual, |
133 InvokeFlag flag); | 133 InvokeFlag flag); |
134 | 134 |
| 135 // Distance from the end of the InvokeCode(Handle<Code>...) generated code |
| 136 // to the start of the immediate address being jumped to. |
| 137 // (Counting 8 bytes for the value itself and 3 bytes for the following |
| 138 // call or jump). |
| 139 static const int kInvokeCodeAddressOffset = -11; |
| 140 |
135 void InvokeCode(Handle<Code> code, | 141 void InvokeCode(Handle<Code> code, |
136 const ParameterCount& expected, | 142 const ParameterCount& expected, |
137 const ParameterCount& actual, | 143 const ParameterCount& actual, |
138 RelocInfo::Mode rmode, | 144 RelocInfo::Mode rmode, |
139 InvokeFlag flag); | 145 InvokeFlag flag); |
140 | 146 |
141 // Invoke the JavaScript function in the given register. Changes the | 147 // Invoke the JavaScript function in the given register. Changes the |
142 // current context to the context in the function before invoking. | 148 // current context to the context in the function before invoking. |
143 void InvokeFunction(Register function, | 149 void InvokeFunction(Register function, |
144 const ParameterCount& actual, | 150 const ParameterCount& actual, |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 } \ | 411 } \ |
406 masm-> | 412 masm-> |
407 #else | 413 #else |
408 #define ACCESS_MASM(masm) masm-> | 414 #define ACCESS_MASM(masm) masm-> |
409 #endif | 415 #endif |
410 | 416 |
411 | 417 |
412 } } // namespace v8::internal | 418 } } // namespace v8::internal |
413 | 419 |
414 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 420 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |