| 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 342 |
| 343 // Tail call a code stub (jump) and return the code object called. Try to | 343 // Tail call a code stub (jump) and return the code object called. Try to |
| 344 // generate the code if necessary. Do not perform a GC but instead return | 344 // generate the code if necessary. Do not perform a GC but instead return |
| 345 // a retry after GC failure. | 345 // a retry after GC failure. |
| 346 Object* TryTailCallStub(CodeStub* stub); | 346 Object* TryTailCallStub(CodeStub* stub); |
| 347 | 347 |
| 348 // Return from a code stub after popping its arguments. | 348 // Return from a code stub after popping its arguments. |
| 349 void StubReturn(int argc); | 349 void StubReturn(int argc); |
| 350 | 350 |
| 351 // Call a runtime routine. | 351 // Call a runtime routine. |
| 352 // Eventually this should be used for all C calls. | |
| 353 void CallRuntime(Runtime::Function* f, int num_arguments); | 352 void CallRuntime(Runtime::Function* f, int num_arguments); |
| 354 | 353 |
| 355 // Call a runtime function, returning the CodeStub object called. | 354 // Call a runtime function, returning the CodeStub object called. |
| 356 // Try to generate the stub code if necessary. Do not perform a GC | 355 // Try to generate the stub code if necessary. Do not perform a GC |
| 357 // but instead return a retry after GC failure. | 356 // but instead return a retry after GC failure. |
| 358 Object* TryCallRuntime(Runtime::Function* f, int num_arguments); | 357 Object* TryCallRuntime(Runtime::Function* f, int num_arguments); |
| 359 | 358 |
| 360 // Convenience function: Same as above, but takes the fid instead. | 359 // Convenience function: Same as above, but takes the fid instead. |
| 361 void CallRuntime(Runtime::FunctionId id, int num_arguments); | 360 void CallRuntime(Runtime::FunctionId id, int num_arguments); |
| 362 | 361 |
| 363 // Convenience function: call an external reference. | 362 // Convenience function: call an external reference. |
| 364 void CallExternalReference(ExternalReference ref, int num_arguments); | 363 void CallExternalReference(ExternalReference ref, int num_arguments); |
| 365 | 364 |
| 366 // Convenience function: Same as above, but takes the fid instead. | 365 // Convenience function: Same as above, but takes the fid instead. |
| 367 Object* TryCallRuntime(Runtime::FunctionId id, int num_arguments); | 366 Object* TryCallRuntime(Runtime::FunctionId id, int num_arguments); |
| 368 | 367 |
| 369 // Tail call of a runtime routine (jump). | 368 // Tail call of a runtime routine (jump). |
| 370 // Like JumpToRuntime, but also takes care of passing the number | 369 // Like JumpToExternalReference, but also takes care of passing the number |
| 371 // of arguments. | 370 // of parameters. |
| 372 void TailCallRuntime(const ExternalReference& ext, | 371 void TailCallExternalReference(const ExternalReference& ext, |
| 372 int num_arguments, |
| 373 int result_size); |
| 374 |
| 375 // Convenience function: tail call a runtime routine (jump). |
| 376 void TailCallRuntime(Runtime::FunctionId fid, |
| 373 int num_arguments, | 377 int num_arguments, |
| 374 int result_size); | 378 int result_size); |
| 375 | 379 |
| 376 void PushHandleScope(Register scratch); | 380 void PushHandleScope(Register scratch); |
| 377 | 381 |
| 378 // Pops a handle scope using the specified scratch register and | 382 // Pops a handle scope using the specified scratch register and |
| 379 // ensuring that saved register, it is not no_reg, is left unchanged. | 383 // ensuring that saved register, it is not no_reg, is left unchanged. |
| 380 void PopHandleScope(Register saved, Register scratch); | 384 void PopHandleScope(Register saved, Register scratch); |
| 381 | 385 |
| 382 // As PopHandleScope, but does not perform a GC. Instead, returns a | 386 // As PopHandleScope, but does not perform a GC. Instead, returns a |
| 383 // retry after GC failure object if GC is necessary. | 387 // retry after GC failure object if GC is necessary. |
| 384 Object* TryPopHandleScope(Register saved, Register scratch); | 388 Object* TryPopHandleScope(Register saved, Register scratch); |
| 385 | 389 |
| 386 // Jump to a runtime routine. | 390 // Jump to a runtime routine. |
| 387 void JumpToRuntime(const ExternalReference& ext); | 391 void JumpToExternalReference(const ExternalReference& ext); |
| 388 | 392 |
| 389 | 393 |
| 390 // --------------------------------------------------------------------------- | 394 // --------------------------------------------------------------------------- |
| 391 // Utilities | 395 // Utilities |
| 392 | 396 |
| 393 void Ret(); | 397 void Ret(); |
| 394 | 398 |
| 395 // Emit code to discard a non-negative number of pointer-sized elements | 399 // Emit code to discard a non-negative number of pointer-sized elements |
| 396 // from the stack, clobbering only the esp register. | 400 // from the stack, clobbering only the esp register. |
| 397 void Drop(int element_count); | 401 void Drop(int element_count); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 } \ | 547 } \ |
| 544 masm-> | 548 masm-> |
| 545 #else | 549 #else |
| 546 #define ACCESS_MASM(masm) masm-> | 550 #define ACCESS_MASM(masm) masm-> |
| 547 #endif | 551 #endif |
| 548 | 552 |
| 549 | 553 |
| 550 } } // namespace v8::internal | 554 } } // namespace v8::internal |
| 551 | 555 |
| 552 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 556 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |