OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 5 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
7 | 7 |
8 #include "assembler.h" | 8 #include "assembler.h" |
9 #include "frames.h" | 9 #include "frames.h" |
10 #include "globals.h" | 10 #include "globals.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
133 // stored. value and scratch registers are clobbered by the operation. | 133 // stored. value and scratch registers are clobbered by the operation. |
134 // The offset is the offset from the start of the object, not the offset from | 134 // The offset is the offset from the start of the object, not the offset from |
135 // the tagged HeapObject pointer. For use with FieldOperand(reg, off). | 135 // the tagged HeapObject pointer. For use with FieldOperand(reg, off). |
136 void RecordWriteField( | 136 void RecordWriteField( |
137 Register object, | 137 Register object, |
138 int offset, | 138 int offset, |
139 Register value, | 139 Register value, |
140 Register scratch, | 140 Register scratch, |
141 SaveFPRegsMode save_fp, | 141 SaveFPRegsMode save_fp, |
142 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, | 142 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
143 SmiCheck smi_check = INLINE_SMI_CHECK); | 143 SmiCheck smi_check = INLINE_SMI_CHECK, |
144 bool value_is_in_new_space = false); | |
Hannes Payer (out of office)
2014/06/03 05:51:48
Can we make value_is_in_new_space an enum like Smi
Benedikt Meurer
2014/06/03 07:48:02
Done.
| |
144 | 145 |
145 // As above, but the offset has the tag presubtracted. For use with | 146 // As above, but the offset has the tag presubtracted. For use with |
146 // Operand(reg, off). | 147 // Operand(reg, off). |
147 void RecordWriteContextSlot( | 148 void RecordWriteContextSlot( |
148 Register context, | 149 Register context, |
149 int offset, | 150 int offset, |
150 Register value, | 151 Register value, |
151 Register scratch, | 152 Register scratch, |
152 SaveFPRegsMode save_fp, | 153 SaveFPRegsMode save_fp, |
153 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, | 154 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
154 SmiCheck smi_check = INLINE_SMI_CHECK) { | 155 SmiCheck smi_check = INLINE_SMI_CHECK, |
156 bool value_is_in_new_space = false) { | |
155 RecordWriteField(context, | 157 RecordWriteField(context, |
156 offset + kHeapObjectTag, | 158 offset + kHeapObjectTag, |
157 value, | 159 value, |
158 scratch, | 160 scratch, |
159 save_fp, | 161 save_fp, |
160 remembered_set_action, | 162 remembered_set_action, |
161 smi_check); | 163 smi_check, |
164 value_is_in_new_space); | |
162 } | 165 } |
163 | 166 |
164 // Notify the garbage collector that we wrote a pointer into a fixed array. | 167 // Notify the garbage collector that we wrote a pointer into a fixed array. |
165 // |array| is the array being stored into, |value| is the | 168 // |array| is the array being stored into, |value| is the |
166 // object being stored. |index| is the array index represented as a | 169 // object being stored. |index| is the array index represented as a |
167 // Smi. All registers are clobbered by the operation RecordWriteArray | 170 // Smi. All registers are clobbered by the operation RecordWriteArray |
168 // filters out smis so it does not update the write barrier if the | 171 // filters out smis so it does not update the write barrier if the |
169 // value is a smi. | 172 // value is a smi. |
170 void RecordWriteArray( | 173 void RecordWriteArray( |
171 Register array, | 174 Register array, |
172 Register value, | 175 Register value, |
173 Register index, | 176 Register index, |
174 SaveFPRegsMode save_fp, | 177 SaveFPRegsMode save_fp, |
175 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, | 178 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
176 SmiCheck smi_check = INLINE_SMI_CHECK); | 179 SmiCheck smi_check = INLINE_SMI_CHECK); |
177 | 180 |
178 // For page containing |object| mark region covering |address| | 181 // For page containing |object| mark region covering |address| |
179 // dirty. |object| is the object being stored into, |value| is the | 182 // dirty. |object| is the object being stored into, |value| is the |
180 // object being stored. The address and value registers are clobbered by the | 183 // object being stored. The address and value registers are clobbered by the |
181 // operation. RecordWrite filters out smis so it does not update the | 184 // operation. RecordWrite filters out smis so it does not update the |
182 // write barrier if the value is a smi. | 185 // write barrier if the value is a smi. |
183 void RecordWrite( | 186 void RecordWrite( |
184 Register object, | 187 Register object, |
185 Register address, | 188 Register address, |
186 Register value, | 189 Register value, |
187 SaveFPRegsMode save_fp, | 190 SaveFPRegsMode save_fp, |
188 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, | 191 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
189 SmiCheck smi_check = INLINE_SMI_CHECK); | 192 SmiCheck smi_check = INLINE_SMI_CHECK, |
193 bool value_is_in_new_space = false); | |
190 | 194 |
191 // For page containing |object| mark the region covering the object's map | 195 // For page containing |object| mark the region covering the object's map |
192 // dirty. |object| is the object being stored into, |map| is the Map object | 196 // dirty. |object| is the object being stored into, |map| is the Map object |
193 // that was stored. | 197 // that was stored. |
194 void RecordWriteForMap( | 198 void RecordWriteForMap( |
195 Register object, | 199 Register object, |
196 Handle<Map> map, | 200 Handle<Map> map, |
197 Register scratch1, | 201 Register scratch1, |
198 Register scratch2, | 202 Register scratch2, |
199 SaveFPRegsMode save_fp); | 203 SaveFPRegsMode save_fp); |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1100 } \ | 1104 } \ |
1101 masm-> | 1105 masm-> |
1102 #else | 1106 #else |
1103 #define ACCESS_MASM(masm) masm-> | 1107 #define ACCESS_MASM(masm) masm-> |
1104 #endif | 1108 #endif |
1105 | 1109 |
1106 | 1110 |
1107 } } // namespace v8::internal | 1111 } } // namespace v8::internal |
1108 | 1112 |
1109 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1113 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |