| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 // a retry after GC failure. | 312 // a retry after GC failure. |
| 313 Object* TryTailCallStub(CodeStub* stub); | 313 Object* TryTailCallStub(CodeStub* stub); |
| 314 | 314 |
| 315 // Return from a code stub after popping its arguments. | 315 // Return from a code stub after popping its arguments. |
| 316 void StubReturn(int argc); | 316 void StubReturn(int argc); |
| 317 | 317 |
| 318 // Call a runtime routine. | 318 // Call a runtime routine. |
| 319 // Eventually this should be used for all C calls. | 319 // Eventually this should be used for all C calls. |
| 320 void CallRuntime(Runtime::Function* f, int num_arguments); | 320 void CallRuntime(Runtime::Function* f, int num_arguments); |
| 321 | 321 |
| 322 // Call a runtime function, returning the RuntimeStub object called. |
| 323 // Try to generate the stub code if necessary. Do not perform a GC |
| 324 // but instead return a retry after GC failure. |
| 325 Object* TryCallRuntime(Runtime::Function* f, int num_arguments); |
| 326 |
| 322 // Convenience function: Same as above, but takes the fid instead. | 327 // Convenience function: Same as above, but takes the fid instead. |
| 323 void CallRuntime(Runtime::FunctionId id, int num_arguments); | 328 void CallRuntime(Runtime::FunctionId id, int num_arguments); |
| 324 | 329 |
| 330 // Convenience function: Same as above, but takes the fid instead. |
| 331 Object* TryCallRuntime(Runtime::FunctionId id, int num_arguments); |
| 332 |
| 325 // Tail call of a runtime routine (jump). | 333 // Tail call of a runtime routine (jump). |
| 326 // Like JumpToRuntime, but also takes care of passing the number | 334 // Like JumpToRuntime, but also takes care of passing the number |
| 327 // of arguments. | 335 // of arguments. |
| 328 void TailCallRuntime(const ExternalReference& ext, | 336 void TailCallRuntime(const ExternalReference& ext, |
| 329 int num_arguments, | 337 int num_arguments, |
| 330 int result_size); | 338 int result_size); |
| 331 | 339 |
| 332 void PushHandleScope(Register scratch); | 340 void PushHandleScope(Register scratch); |
| 333 | 341 |
| 334 // Pops a handle scope using the specified scratch register and | 342 // Pops a handle scope using the specified scratch register and |
| 335 // ensuring that saved register, it is not no_reg, is left unchanged. | 343 // ensuring that saved register, it is not no_reg, is left unchanged. |
| 336 void PopHandleScope(Register saved, Register scratch); | 344 void PopHandleScope(Register saved, Register scratch); |
| 337 | 345 |
| 346 // As PopHandleScope, but does not perform a GC. Instead, returns a |
| 347 // retry after GC failure object if GC is necessary. |
| 348 Object* TryPopHandleScope(Register saved, Register scratch); |
| 349 |
| 338 // Jump to a runtime routine. | 350 // Jump to a runtime routine. |
| 339 void JumpToRuntime(const ExternalReference& ext); | 351 void JumpToRuntime(const ExternalReference& ext); |
| 340 | 352 |
| 341 | 353 |
| 342 // --------------------------------------------------------------------------- | 354 // --------------------------------------------------------------------------- |
| 343 // Utilities | 355 // Utilities |
| 344 | 356 |
| 345 void Ret(); | 357 void Ret(); |
| 346 | 358 |
| 347 void Drop(int element_count); | 359 void Drop(int element_count); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 | 432 |
| 421 void EnterExitFramePrologue(ExitFrame::Mode mode); | 433 void EnterExitFramePrologue(ExitFrame::Mode mode); |
| 422 void EnterExitFrameEpilogue(ExitFrame::Mode mode, int argc); | 434 void EnterExitFrameEpilogue(ExitFrame::Mode mode, int argc); |
| 423 | 435 |
| 424 // Allocation support helpers. | 436 // Allocation support helpers. |
| 425 void LoadAllocationTopHelper(Register result, | 437 void LoadAllocationTopHelper(Register result, |
| 426 Register result_end, | 438 Register result_end, |
| 427 Register scratch, | 439 Register scratch, |
| 428 AllocationFlags flags); | 440 AllocationFlags flags); |
| 429 void UpdateAllocationTopHelper(Register result_end, Register scratch); | 441 void UpdateAllocationTopHelper(Register result_end, Register scratch); |
| 442 |
| 443 // Helper for PopHandleScope. Allowed to perform a GC and returns |
| 444 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and |
| 445 // possibly returns a failure object indicating an allocation failure. |
| 446 Object* PopHandleScopeHelper(Register saved, |
| 447 Register scratch, |
| 448 bool gc_allowed); |
| 430 }; | 449 }; |
| 431 | 450 |
| 432 | 451 |
| 433 // The code patcher is used to patch (typically) small parts of code e.g. for | 452 // The code patcher is used to patch (typically) small parts of code e.g. for |
| 434 // debugging and other types of instrumentation. When using the code patcher | 453 // debugging and other types of instrumentation. When using the code patcher |
| 435 // the exact number of bytes specified must be emitted. Is not legal to emit | 454 // the exact number of bytes specified must be emitted. Is not legal to emit |
| 436 // relocation information. If any of these constraints are violated it causes | 455 // relocation information. If any of these constraints are violated it causes |
| 437 // an assertion. | 456 // an assertion. |
| 438 class CodePatcher { | 457 class CodePatcher { |
| 439 public: | 458 public: |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 } \ | 505 } \ |
| 487 masm-> | 506 masm-> |
| 488 #else | 507 #else |
| 489 #define ACCESS_MASM(masm) masm-> | 508 #define ACCESS_MASM(masm) masm-> |
| 490 #endif | 509 #endif |
| 491 | 510 |
| 492 | 511 |
| 493 } } // namespace v8::internal | 512 } } // namespace v8::internal |
| 494 | 513 |
| 495 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 514 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |