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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 #endif | 214 #endif |
215 | 215 |
216 #undef __ | 216 #undef __ |
217 | 217 |
218 // ------------------------------------------------------------------------- | 218 // ------------------------------------------------------------------------- |
219 // Code generators | 219 // Code generators |
220 | 220 |
221 #define __ ACCESS_MASM(masm) | 221 #define __ ACCESS_MASM(masm) |
222 | 222 |
223 void ElementsTransitionGenerator::GenerateSmiOnlyToObject( | 223 void ElementsTransitionGenerator::GenerateMapChangeElementTransition( |
224 MacroAssembler* masm) { | 224 MacroAssembler* masm) { |
225 // ----------- S t a t e ------------- | 225 // ----------- S t a t e ------------- |
226 // -- rax : value | 226 // -- rax : value |
227 // -- rbx : target map | 227 // -- rbx : target map |
228 // -- rcx : key | 228 // -- rcx : key |
229 // -- rdx : receiver | 229 // -- rdx : receiver |
230 // -- rsp[0] : return address | 230 // -- rsp[0] : return address |
231 // ----------------------------------- | 231 // ----------------------------------- |
232 // Set transitioned map. | 232 // Set transitioned map. |
233 __ movq(FieldOperand(rdx, HeapObject::kMapOffset), rbx); | 233 __ movq(FieldOperand(rdx, HeapObject::kMapOffset), rbx); |
234 __ RecordWriteField(rdx, | 234 __ RecordWriteField(rdx, |
235 HeapObject::kMapOffset, | 235 HeapObject::kMapOffset, |
236 rbx, | 236 rbx, |
237 rdi, | 237 rdi, |
238 kDontSaveFPRegs, | 238 kDontSaveFPRegs, |
239 EMIT_REMEMBERED_SET, | 239 EMIT_REMEMBERED_SET, |
240 OMIT_SMI_CHECK); | 240 OMIT_SMI_CHECK); |
241 } | 241 } |
242 | 242 |
243 | 243 |
244 void ElementsTransitionGenerator::GenerateSmiOnlyToDouble( | 244 void ElementsTransitionGenerator::GenerateSmiToDouble( |
245 MacroAssembler* masm, Label* fail) { | 245 MacroAssembler* masm, Label* fail) { |
246 // ----------- S t a t e ------------- | 246 // ----------- S t a t e ------------- |
247 // -- rax : value | 247 // -- rax : value |
248 // -- rbx : target map | 248 // -- rbx : target map |
249 // -- rcx : key | 249 // -- rcx : key |
250 // -- rdx : receiver | 250 // -- rdx : receiver |
251 // -- rsp[0] : return address | 251 // -- rsp[0] : return address |
252 // ----------------------------------- | 252 // ----------------------------------- |
253 // The fail label is not actually used since we do not allocate. | 253 // The fail label is not actually used since we do not allocate. |
254 Label allocated, new_backing_store, only_change_map, done; | 254 Label allocated, new_backing_store, only_change_map, done; |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 times_1, | 573 times_1, |
574 SeqAsciiString::kHeaderSize)); | 574 SeqAsciiString::kHeaderSize)); |
575 __ bind(&done); | 575 __ bind(&done); |
576 } | 576 } |
577 | 577 |
578 #undef __ | 578 #undef __ |
579 | 579 |
580 } } // namespace v8::internal | 580 } } // namespace v8::internal |
581 | 581 |
582 #endif // V8_TARGET_ARCH_X64 | 582 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |