OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 Register key, | 543 Register key, |
544 Register r0, | 544 Register r0, |
545 Register r1, | 545 Register r1, |
546 Register r2, | 546 Register r2, |
547 Register result); | 547 Register result); |
548 | 548 |
549 | 549 |
550 // --------------------------------------------------------------------------- | 550 // --------------------------------------------------------------------------- |
551 // Allocation support | 551 // Allocation support |
552 | 552 |
553 // Allocate an object in new space. If the new space is exhausted control | 553 // Allocate an object in new space or old pointer space. If the given space |
554 // continues at the gc_required label. The allocated object is returned in | 554 // is exhausted control continues at the gc_required label. The allocated |
555 // result and end of the new object is returned in result_end. The register | 555 // object is returned in result and end of the new object is returned in |
556 // scratch can be passed as no_reg in which case an additional object | 556 // result_end. The register scratch can be passed as no_reg in which case |
557 // reference will be added to the reloc info. The returned pointers in result | 557 // an additional object reference will be added to the reloc info. The |
558 // and result_end have not yet been tagged as heap objects. If | 558 // returned pointers in result and result_end have not yet been tagged as |
559 // result_contains_top_on_entry is true the content of result is known to be | 559 // heap objects. If result_contains_top_on_entry is true the content of |
560 // the allocation top on entry (could be result_end from a previous call to | 560 // result is known to be the allocation top on entry (could be result_end |
561 // AllocateInNewSpace). If result_contains_top_on_entry is true scratch | 561 // from a previous call). If result_contains_top_on_entry is true scratch |
562 // should be no_reg as it is never used. | 562 // should be no_reg as it is never used. |
563 void AllocateInNewSpace(int object_size, | 563 void Allocate(int object_size, |
564 Register result, | 564 Register result, |
565 Register result_end, | 565 Register result_end, |
566 Register scratch, | 566 Register scratch, |
567 Label* gc_required, | 567 Label* gc_required, |
568 AllocationFlags flags); | 568 AllocationFlags flags); |
569 | 569 |
570 void AllocateInNewSpace(int header_size, | 570 void AllocateInNewSpace(int header_size, |
571 ScaleFactor element_size, | 571 ScaleFactor element_size, |
572 Register element_count, | 572 Register element_count, |
573 RegisterValueType element_count_type, | 573 RegisterValueType element_count_type, |
574 Register result, | 574 Register result, |
575 Register result_end, | 575 Register result_end, |
576 Register scratch, | 576 Register scratch, |
577 Label* gc_required, | 577 Label* gc_required, |
578 AllocationFlags flags); | 578 AllocationFlags flags); |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 | 889 |
890 void EnterExitFramePrologue(); | 890 void EnterExitFramePrologue(); |
891 void EnterExitFrameEpilogue(int argc, bool save_doubles); | 891 void EnterExitFrameEpilogue(int argc, bool save_doubles); |
892 | 892 |
893 void LeaveExitFrameEpilogue(); | 893 void LeaveExitFrameEpilogue(); |
894 | 894 |
895 // Allocation support helpers. | 895 // Allocation support helpers. |
896 void LoadAllocationTopHelper(Register result, | 896 void LoadAllocationTopHelper(Register result, |
897 Register scratch, | 897 Register scratch, |
898 AllocationFlags flags); | 898 AllocationFlags flags); |
899 void UpdateAllocationTopHelper(Register result_end, Register scratch); | 899 |
| 900 void UpdateAllocationTopHelper(Register result_end, |
| 901 Register scratch, |
| 902 AllocationFlags flags); |
900 | 903 |
901 // Helper for PopHandleScope. Allowed to perform a GC and returns | 904 // Helper for PopHandleScope. Allowed to perform a GC and returns |
902 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and | 905 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and |
903 // possibly returns a failure object indicating an allocation failure. | 906 // possibly returns a failure object indicating an allocation failure. |
904 MUST_USE_RESULT MaybeObject* PopHandleScopeHelper(Register saved, | 907 MUST_USE_RESULT MaybeObject* PopHandleScopeHelper(Register saved, |
905 Register scratch, | 908 Register scratch, |
906 bool gc_allowed); | 909 bool gc_allowed); |
907 | 910 |
908 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. | 911 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. |
909 void InNewSpace(Register object, | 912 void InNewSpace(Register object, |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 } \ | 1007 } \ |
1005 masm-> | 1008 masm-> |
1006 #else | 1009 #else |
1007 #define ACCESS_MASM(masm) masm-> | 1010 #define ACCESS_MASM(masm) masm-> |
1008 #endif | 1011 #endif |
1009 | 1012 |
1010 | 1013 |
1011 } } // namespace v8::internal | 1014 } } // namespace v8::internal |
1012 | 1015 |
1013 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1016 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |