OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 | 467 |
468 // Tail call a code stub (jump) and return the code object called. Try to | 468 // Tail call a code stub (jump) and return the code object called. Try to |
469 // generate the code if necessary. Do not perform a GC but instead return | 469 // generate the code if necessary. Do not perform a GC but instead return |
470 // a retry after GC failure. | 470 // a retry after GC failure. |
471 MUST_USE_RESULT MaybeObject* TryTailCallStub(CodeStub* stub); | 471 MUST_USE_RESULT MaybeObject* TryTailCallStub(CodeStub* stub); |
472 | 472 |
473 // Return from a code stub after popping its arguments. | 473 // Return from a code stub after popping its arguments. |
474 void StubReturn(int argc); | 474 void StubReturn(int argc); |
475 | 475 |
476 // Call a runtime routine. | 476 // Call a runtime routine. |
477 void CallRuntime(Runtime::Function* f, int num_arguments); | 477 void CallRuntime(const Runtime::Function* f, int num_arguments); |
478 void CallRuntimeSaveDoubles(Runtime::FunctionId id); | 478 void CallRuntimeSaveDoubles(Runtime::FunctionId id); |
479 | 479 |
480 // Call a runtime function, returning the CodeStub object called. | 480 // Call a runtime function, returning the CodeStub object called. |
481 // Try to generate the stub code if necessary. Do not perform a GC | 481 // Try to generate the stub code if necessary. Do not perform a GC |
482 // but instead return a retry after GC failure. | 482 // but instead return a retry after GC failure. |
483 MUST_USE_RESULT MaybeObject* TryCallRuntime(Runtime::Function* f, | 483 MUST_USE_RESULT MaybeObject* TryCallRuntime(const Runtime::Function* f, |
484 int num_arguments); | 484 int num_arguments); |
485 | 485 |
486 // Convenience function: Same as above, but takes the fid instead. | 486 // Convenience function: Same as above, but takes the fid instead. |
487 void CallRuntime(Runtime::FunctionId id, int num_arguments); | 487 void CallRuntime(Runtime::FunctionId id, int num_arguments); |
488 | 488 |
489 // Convenience function: Same as above, but takes the fid instead. | 489 // Convenience function: Same as above, but takes the fid instead. |
490 MUST_USE_RESULT MaybeObject* TryCallRuntime(Runtime::FunctionId id, | 490 MUST_USE_RESULT MaybeObject* TryCallRuntime(Runtime::FunctionId id, |
491 int num_arguments); | 491 int num_arguments); |
492 | 492 |
493 // Convenience function: call an external reference. | 493 // Convenience function: call an external reference. |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 // The mask isn't really an address. We load it as an external reference in | 695 // The mask isn't really an address. We load it as an external reference in |
696 // case the size of the new space is different between the snapshot maker | 696 // case the size of the new space is different between the snapshot maker |
697 // and the running system. | 697 // and the running system. |
698 and_(Operand(scratch), Immediate(ExternalReference::new_space_mask())); | 698 and_(Operand(scratch), Immediate(ExternalReference::new_space_mask())); |
699 cmp(Operand(scratch), Immediate(ExternalReference::new_space_start())); | 699 cmp(Operand(scratch), Immediate(ExternalReference::new_space_start())); |
700 j(cc, branch); | 700 j(cc, branch); |
701 } else { | 701 } else { |
702 int32_t new_space_start = reinterpret_cast<int32_t>( | 702 int32_t new_space_start = reinterpret_cast<int32_t>( |
703 ExternalReference::new_space_start().address()); | 703 ExternalReference::new_space_start().address()); |
704 lea(scratch, Operand(object, -new_space_start)); | 704 lea(scratch, Operand(object, -new_space_start)); |
705 and_(scratch, Heap::NewSpaceMask()); | 705 and_(scratch, HEAP->NewSpaceMask()); |
706 j(cc, branch); | 706 j(cc, branch); |
707 } | 707 } |
708 } | 708 } |
709 | 709 |
710 | 710 |
711 // The code patcher is used to patch (typically) small parts of code e.g. for | 711 // The code patcher is used to patch (typically) small parts of code e.g. for |
712 // debugging and other types of instrumentation. When using the code patcher | 712 // debugging and other types of instrumentation. When using the code patcher |
713 // the exact number of bytes specified must be emitted. Is not legal to emit | 713 // the exact number of bytes specified must be emitted. Is not legal to emit |
714 // relocation information. If any of these constraints are violated it causes | 714 // relocation information. If any of these constraints are violated it causes |
715 // an assertion. | 715 // an assertion. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 } \ | 789 } \ |
790 masm-> | 790 masm-> |
791 #else | 791 #else |
792 #define ACCESS_MASM(masm) masm-> | 792 #define ACCESS_MASM(masm) masm-> |
793 #endif | 793 #endif |
794 | 794 |
795 | 795 |
796 } } // namespace v8::internal | 796 } } // namespace v8::internal |
797 | 797 |
798 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 798 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |