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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 void PushRegistersFromMemory(RegList regs); | 79 void PushRegistersFromMemory(RegList regs); |
80 void PopRegistersToMemory(RegList regs); | 80 void PopRegistersToMemory(RegList regs); |
81 void CopyRegistersFromStackToMemory(Register base, | 81 void CopyRegistersFromStackToMemory(Register base, |
82 Register scratch, | 82 Register scratch, |
83 RegList regs); | 83 RegList regs); |
84 | 84 |
85 | 85 |
86 // --------------------------------------------------------------------------- | 86 // --------------------------------------------------------------------------- |
87 // Activation frames | 87 // Activation frames |
88 | 88 |
89 void EnterInternalFrame(); | 89 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); } |
90 void LeaveInternalFrame(); | 90 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); } |
| 91 |
| 92 void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); } |
| 93 void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); } |
91 | 94 |
92 // Enter specific kind of exit frame; either EXIT or | 95 // Enter specific kind of exit frame; either EXIT or |
93 // EXIT_DEBUG. Expects the number of arguments in register eax and | 96 // EXIT_DEBUG. Expects the number of arguments in register eax and |
94 // sets up the number of arguments in register edi and the pointer | 97 // sets up the number of arguments in register edi and the pointer |
95 // to the first argument in register esi. | 98 // to the first argument in register esi. |
96 void EnterExitFrame(StackFrame::Type type); | 99 void EnterExitFrame(StackFrame::Type type); |
97 | 100 |
98 // Leave the current exit frame. Expects the return value in | 101 // Leave the current exit frame. Expects the return value in |
99 // register eax:edx (untouched) and the pointer to the first | 102 // register eax:edx (untouched) and the pointer to the first |
100 // argument in register esi. | 103 // argument in register esi. |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 void InvokePrologue(const ParameterCount& expected, | 270 void InvokePrologue(const ParameterCount& expected, |
268 const ParameterCount& actual, | 271 const ParameterCount& actual, |
269 Handle<Code> code_constant, | 272 Handle<Code> code_constant, |
270 const Operand& code_operand, | 273 const Operand& code_operand, |
271 Label* done, | 274 Label* done, |
272 InvokeFlag flag); | 275 InvokeFlag flag); |
273 | 276 |
274 // Get the code for the given builtin. Returns if able to resolve | 277 // Get the code for the given builtin. Returns if able to resolve |
275 // the function in the 'resolved' flag. | 278 // the function in the 'resolved' flag. |
276 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved); | 279 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved); |
| 280 |
| 281 // Activation support. |
| 282 void EnterFrame(StackFrame::Type type); |
| 283 void LeaveFrame(StackFrame::Type type); |
277 }; | 284 }; |
278 | 285 |
279 | 286 |
280 // The code patcher is used to patch (typically) small parts of code e.g. for | 287 // The code patcher is used to patch (typically) small parts of code e.g. for |
281 // debugging and other types of instrumentation. When using the code patcher | 288 // debugging and other types of instrumentation. When using the code patcher |
282 // the exact number of bytes specified must be emitted. Is not legal to emit | 289 // the exact number of bytes specified must be emitted. Is not legal to emit |
283 // relocation information. If any of these constraints are violated it causes | 290 // relocation information. If any of these constraints are violated it causes |
284 // an assertion. | 291 // an assertion. |
285 class CodePatcher { | 292 class CodePatcher { |
286 public: | 293 public: |
(...skipping 23 matching lines...) Expand all Loading... |
310 Register index, | 317 Register index, |
311 ScaleFactor scale, | 318 ScaleFactor scale, |
312 int offset) { | 319 int offset) { |
313 return Operand(object, index, scale, offset - kHeapObjectTag); | 320 return Operand(object, index, scale, offset - kHeapObjectTag); |
314 } | 321 } |
315 | 322 |
316 | 323 |
317 } } // namespace v8::internal | 324 } } // namespace v8::internal |
318 | 325 |
319 #endif // V8_MACRO_ASSEMBLER_IA32_H_ | 326 #endif // V8_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |