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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 Register key, | 557 Register key, |
558 Register r0, | 558 Register r0, |
559 Register r1, | 559 Register r1, |
560 Register r2, | 560 Register r2, |
561 Register result); | 561 Register result); |
562 | 562 |
563 | 563 |
564 // --------------------------------------------------------------------------- | 564 // --------------------------------------------------------------------------- |
565 // Allocation support | 565 // Allocation support |
566 | 566 |
567 // Allocate an object in new space. If the new space is exhausted control | 567 // Allocate an object in new space or old pointer space. If the given space |
568 // continues at the gc_required label. The allocated object is returned in | 568 // is exhausted control continues at the gc_required label. The allocated |
569 // result and end of the new object is returned in result_end. The register | 569 // object is returned in result and end of the new object is returned in |
570 // scratch can be passed as no_reg in which case an additional object | 570 // result_end. The register scratch can be passed as no_reg in which case |
571 // reference will be added to the reloc info. The returned pointers in result | 571 // an additional object reference will be added to the reloc info. The |
572 // and result_end have not yet been tagged as heap objects. If | 572 // returned pointers in result and result_end have not yet been tagged as |
573 // result_contains_top_on_entry is true the content of result is known to be | 573 // heap objects. If result_contains_top_on_entry is true the content of |
574 // the allocation top on entry (could be result_end from a previous call to | 574 // result is known to be the allocation top on entry (could be result_end |
575 // AllocateInNewSpace). If result_contains_top_on_entry is true scratch | 575 // from a previous call). If result_contains_top_on_entry is true scratch |
576 // should be no_reg as it is never used. | 576 // should be no_reg as it is never used. |
577 void AllocateInNewSpace(int object_size, | 577 void Allocate(int object_size, |
578 Register result, | 578 Register result, |
579 Register result_end, | 579 Register result_end, |
580 Register scratch, | 580 Register scratch, |
581 Label* gc_required, | 581 Label* gc_required, |
582 AllocationFlags flags); | 582 AllocationFlags flags); |
583 | 583 |
584 void AllocateInNewSpace(int header_size, | 584 void AllocateInNewSpace(int header_size, |
585 ScaleFactor element_size, | 585 ScaleFactor element_size, |
586 Register element_count, | 586 Register element_count, |
587 RegisterValueType element_count_type, | 587 RegisterValueType element_count_type, |
588 Register result, | 588 Register result, |
589 Register result_end, | 589 Register result_end, |
590 Register scratch, | 590 Register scratch, |
591 Label* gc_required, | 591 Label* gc_required, |
592 AllocationFlags flags); | 592 AllocationFlags flags); |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 | 903 |
904 void EnterExitFramePrologue(); | 904 void EnterExitFramePrologue(); |
905 void EnterExitFrameEpilogue(int argc, bool save_doubles); | 905 void EnterExitFrameEpilogue(int argc, bool save_doubles); |
906 | 906 |
907 void LeaveExitFrameEpilogue(); | 907 void LeaveExitFrameEpilogue(); |
908 | 908 |
909 // Allocation support helpers. | 909 // Allocation support helpers. |
910 void LoadAllocationTopHelper(Register result, | 910 void LoadAllocationTopHelper(Register result, |
911 Register scratch, | 911 Register scratch, |
912 AllocationFlags flags); | 912 AllocationFlags flags); |
913 void UpdateAllocationTopHelper(Register result_end, Register scratch); | 913 |
| 914 void UpdateAllocationTopHelper(Register result_end, |
| 915 Register scratch, |
| 916 AllocationFlags flags); |
914 | 917 |
915 // Helper for PopHandleScope. Allowed to perform a GC and returns | 918 // Helper for PopHandleScope. Allowed to perform a GC and returns |
916 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and | 919 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and |
917 // possibly returns a failure object indicating an allocation failure. | 920 // possibly returns a failure object indicating an allocation failure. |
918 MUST_USE_RESULT MaybeObject* PopHandleScopeHelper(Register saved, | 921 MUST_USE_RESULT MaybeObject* PopHandleScopeHelper(Register saved, |
919 Register scratch, | 922 Register scratch, |
920 bool gc_allowed); | 923 bool gc_allowed); |
921 | 924 |
922 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. | 925 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. |
923 void InNewSpace(Register object, | 926 void InNewSpace(Register object, |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 } \ | 1021 } \ |
1019 masm-> | 1022 masm-> |
1020 #else | 1023 #else |
1021 #define ACCESS_MASM(masm) masm-> | 1024 #define ACCESS_MASM(masm) masm-> |
1022 #endif | 1025 #endif |
1023 | 1026 |
1024 | 1027 |
1025 } } // namespace v8::internal | 1028 } } // namespace v8::internal |
1026 | 1029 |
1027 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1030 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |