Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 | 274 |
| 275 // Store the top value on the virtual frame into a local frame slot. The | 275 // Store the top value on the virtual frame into a local frame slot. The |
| 276 // value is left in place on top of the frame. | 276 // value is left in place on top of the frame. |
| 277 void StoreToLocalAt(int index) { | 277 void StoreToLocalAt(int index) { |
| 278 StoreToFrameSlotAt(local0_index() + index); | 278 StoreToFrameSlotAt(local0_index() + index); |
| 279 } | 279 } |
| 280 | 280 |
| 281 // The function frame slot. | 281 // The function frame slot. |
| 282 Operand Function() const { return Operand(ebp, kFunctionOffset); } | 282 Operand Function() const { return Operand(ebp, kFunctionOffset); } |
| 283 | 283 |
| 284 // The context frame slot. | 284 // Save the value of the esi register in the context frame slot. |
|
William Hesse
2009/01/06 12:04:08
Comment should say that that esi is not synced to
Kevin Millikin (Chromium)
2009/01/06 12:10:28
Comment changed.
| |
| 285 Operand Context() const { return Operand(ebp, kContextOffset); } | 285 void SaveContextRegister(); |
| 286 | |
| 287 // Restore the esi register with the value of the frame context slot. | |
| 288 void RestoreContextRegister(); | |
| 286 | 289 |
| 287 // A parameter as an assembly operand. | 290 // A parameter as an assembly operand. |
| 288 Operand ParameterAt(int index) const { | 291 Operand ParameterAt(int index) const { |
| 289 ASSERT(-1 <= index); // -1 is the receiver. | 292 ASSERT(-1 <= index); // -1 is the receiver. |
| 290 ASSERT(index < parameter_count_); | 293 ASSERT(index < parameter_count_); |
| 291 return Operand(ebp, (1 + parameter_count_ - index) * kPointerSize); | 294 return Operand(ebp, (1 + parameter_count_ - index) * kPointerSize); |
| 292 } | 295 } |
| 293 | 296 |
| 294 // Push a copy of the value of a parameter frame slot on top of the frame. | 297 // Push a copy of the value of a parameter frame slot on top of the frame. |
| 295 void LoadParameterAt(int index) { | 298 void LoadParameterAt(int index) { |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 319 // removes from) the top of the physical frame. | 322 // removes from) the top of the physical frame. |
| 320 void CallStub(CodeStub* stub, int frame_arg_count); | 323 void CallStub(CodeStub* stub, int frame_arg_count); |
| 321 Result CallStub(CodeStub* stub, Result* arg, int frame_arg_count); | 324 Result CallStub(CodeStub* stub, Result* arg, int frame_arg_count); |
| 322 Result CallStub(CodeStub* stub, | 325 Result CallStub(CodeStub* stub, |
| 323 Result* arg0, | 326 Result* arg0, |
| 324 Result* arg1, | 327 Result* arg1, |
| 325 int frame_arg_count); | 328 int frame_arg_count); |
| 326 | 329 |
| 327 // Call the runtime, given the number of arguments expected on (and | 330 // Call the runtime, given the number of arguments expected on (and |
| 328 // removed from) the top of the physical frame. | 331 // removed from) the top of the physical frame. |
| 329 void CallRuntime(Runtime::Function* f, int frame_arg_count); | 332 Result CallRuntime(Runtime::Function* f, int frame_arg_count); |
| 330 void CallRuntime(Runtime::FunctionId id, int frame_arg_count); | 333 Result CallRuntime(Runtime::FunctionId id, int frame_arg_count); |
| 331 | 334 |
| 332 // Invoke a builtin, given the number of arguments it expects on (and | 335 // Invoke a builtin, given the number of arguments it expects on (and |
| 333 // removes from) the top of the physical frame. | 336 // removes from) the top of the physical frame. |
| 334 void InvokeBuiltin(Builtins::JavaScript id, | 337 void InvokeBuiltin(Builtins::JavaScript id, |
| 335 InvokeFlag flag, | 338 InvokeFlag flag, |
| 336 int frame_arg_count); | 339 int frame_arg_count); |
| 337 | 340 |
| 338 // Call into a JS code object, given the number of arguments it expects on | 341 // Call into a JS code object, given the number of arguments it expects on |
| 339 // (and removes from) the top of the physical frame. | 342 // (and removes from) the top of the physical frame. |
| 340 void CallCodeObject(Handle<Code> ic, | 343 void CallCodeObject(Handle<Code> ic, |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 504 // Called after all register-to-memory and register-to-register | 507 // Called after all register-to-memory and register-to-register |
| 505 // moves have been made. After this function returns, the frames | 508 // moves have been made. After this function returns, the frames |
| 506 // should be equal. | 509 // should be equal. |
| 507 void MergeMoveMemoryToRegisters(VirtualFrame *expected); | 510 void MergeMoveMemoryToRegisters(VirtualFrame *expected); |
| 508 }; | 511 }; |
| 509 | 512 |
| 510 | 513 |
| 511 } } // namespace v8::internal | 514 } } // namespace v8::internal |
| 512 | 515 |
| 513 #endif // V8_VIRTUAL_FRAME_IA32_H_ | 516 #endif // V8_VIRTUAL_FRAME_IA32_H_ |
| OLD | NEW |