Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 // then we just fall through, since it is already live. If it is white and | 130 // then we just fall through, since it is already live. If it is white and |
| 131 // we can determine that it doesn't need to be scanned, then we just mark it | 131 // we can determine that it doesn't need to be scanned, then we just mark it |
| 132 // black and fall through. For the rest we jump to the label so the | 132 // black and fall through. For the rest we jump to the label so the |
| 133 // incremental marker can fix its assumptions. | 133 // incremental marker can fix its assumptions. |
| 134 void EnsureNotWhite(Register object, | 134 void EnsureNotWhite(Register object, |
| 135 Register scratch1, | 135 Register scratch1, |
| 136 Register scratch2, | 136 Register scratch2, |
| 137 Label* object_is_white_and_not_data, | 137 Label* object_is_white_and_not_data, |
| 138 Label::Distance distance); | 138 Label::Distance distance); |
| 139 | 139 |
| 140 // Detects conservatively whether an object is data-only, ie it does need to | |
| 141 // be scanned by the garbage collector. | |
| 142 void JumpIfDataObject(Register value, | |
| 143 Register scratch, | |
| 144 Label* not_data_object, | |
| 145 Label::Distance not_data_object_distance); | |
| 146 | |
| 147 // Notify the garbage collector that we wrote a pointer into an object. | 140 // Notify the garbage collector that we wrote a pointer into an object. |
| 148 // |object| is the object being stored into, |value| is the object being | 141 // |object| is the object being stored into, |value| is the object being |
| 149 // stored. value and scratch registers are clobbered by the operation. | 142 // stored. value and scratch registers are clobbered by the operation. |
| 150 // The offset is the offset from the start of the object, not the offset from | 143 // The offset is the offset from the start of the object, not the offset from |
| 151 // the tagged HeapObject pointer. For use with FieldOperand(reg, off). | 144 // the tagged HeapObject pointer. For use with FieldOperand(reg, off). |
| 152 void RecordWriteField( | 145 void RecordWriteField( |
| 153 Register object, | 146 Register object, |
| 154 int offset, | 147 int offset, |
| 155 Register value, | 148 Register value, |
| 156 Register scratch, | 149 Register scratch, |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 796 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. | 789 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. |
| 797 void InNewSpace(Register object, | 790 void InNewSpace(Register object, |
| 798 Register scratch, | 791 Register scratch, |
| 799 Condition cc, | 792 Condition cc, |
| 800 Label* condition_met, | 793 Label* condition_met, |
| 801 Label::Distance condition_met_distance = Label::kFar); | 794 Label::Distance condition_met_distance = Label::kFar); |
| 802 | 795 |
| 803 // Helper for finding the mark bits for an address. Afterwards, the | 796 // Helper for finding the mark bits for an address. Afterwards, the |
| 804 // bitmap register points at the word with the mark bits and the mask | 797 // bitmap register points at the word with the mark bits and the mask |
| 805 // the position of the first bit. Uses ecx as scratch and leaves addr_reg | 798 // the position of the first bit. Uses ecx as scratch and leaves addr_reg |
| 806 // unchanged. | 799 // unchanged, unless it's also mask_reg. |
|
Erik Corry
2011/06/24 09:46:17
The implementation asserts that none of the regist
Lasse Reichstein
2011/06/24 11:09:08
Ack, forgot to change comment back when I reverted
| |
| 807 inline void GetMarkBits(Register addr_reg, | 800 inline void GetMarkBits(Register addr_reg, |
| 808 Register bitmap_reg, | 801 Register bitmap_reg, |
| 809 Register mask_reg); | 802 Register mask_reg); |
| 810 | 803 |
| 811 // Compute memory operands for safepoint stack slots. | 804 // Compute memory operands for safepoint stack slots. |
| 812 Operand SafepointRegisterSlot(Register reg); | 805 Operand SafepointRegisterSlot(Register reg); |
| 813 static int SafepointRegisterStackIndex(int reg_code); | 806 static int SafepointRegisterStackIndex(int reg_code); |
| 814 | 807 |
| 815 // Needs access to SafepointRegisterStackIndex for optimized frame | 808 // Needs access to SafepointRegisterStackIndex for optimized frame |
| 816 // traversal. | 809 // traversal. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 888 } \ | 881 } \ |
| 889 masm-> | 882 masm-> |
| 890 #else | 883 #else |
| 891 #define ACCESS_MASM(masm) masm-> | 884 #define ACCESS_MASM(masm) masm-> |
| 892 #endif | 885 #endif |
| 893 | 886 |
| 894 | 887 |
| 895 } } // namespace v8::internal | 888 } } // namespace v8::internal |
| 896 | 889 |
| 897 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 890 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |