| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 __ movsd(FieldOperand(storage_reg, HeapNumber::kValueOffset), xmm0); | 383 __ movsd(FieldOperand(storage_reg, HeapNumber::kValueOffset), xmm0); |
| 384 } | 384 } |
| 385 | 385 |
| 386 // Stub never generated for objects that require access checks. | 386 // Stub never generated for objects that require access checks. |
| 387 DCHECK(!transition->is_access_check_needed()); | 387 DCHECK(!transition->is_access_check_needed()); |
| 388 | 388 |
| 389 // Perform map transition for the receiver if necessary. | 389 // Perform map transition for the receiver if necessary. |
| 390 if (details.type() == FIELD && | 390 if (details.type() == FIELD && |
| 391 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0) { | 391 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0) { |
| 392 // The properties must be extended before we can store the value. | 392 // The properties must be extended before we can store the value. |
| 393 // We jump to a runtime call that extends the properties array. | 393 __ mov(ExtendStorageDescriptor::MapRegister(), Immediate(transition)); |
| 394 __ pop(scratch1); // Return address. | 394 |
| 395 __ push(receiver_reg); | 395 ExtendStorageStub stub(isolate(), |
| 396 __ push(Immediate(transition)); | 396 FieldIndex::ForDescriptor(*transition, descriptor), |
| 397 __ push(value_reg); | 397 representation); |
| 398 __ push(scratch1); | 398 GenerateTailCall(masm(), stub.GetCode()); |
| 399 __ TailCallExternalReference( | |
| 400 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage), | |
| 401 isolate()), | |
| 402 3, 1); | |
| 403 return; | 399 return; |
| 404 } | 400 } |
| 405 | 401 |
| 406 // Update the map of the object. | 402 // Update the map of the object. |
| 407 __ mov(scratch1, Immediate(transition)); | 403 __ mov(scratch1, Immediate(transition)); |
| 408 __ mov(FieldOperand(receiver_reg, HeapObject::kMapOffset), scratch1); | 404 __ mov(FieldOperand(receiver_reg, HeapObject::kMapOffset), scratch1); |
| 409 | 405 |
| 410 // Update the write barrier for the map field. | 406 // Update the write barrier for the map field. |
| 411 __ RecordWriteField(receiver_reg, HeapObject::kMapOffset, scratch1, scratch2, | 407 __ RecordWriteField(receiver_reg, HeapObject::kMapOffset, scratch1, scratch2, |
| 412 kDontSaveFPRegs, OMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | 408 kDontSaveFPRegs, OMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 // Return the generated code. | 840 // Return the generated code. |
| 845 return GetCode(kind(), Code::NORMAL, name); | 841 return GetCode(kind(), Code::NORMAL, name); |
| 846 } | 842 } |
| 847 | 843 |
| 848 | 844 |
| 849 #undef __ | 845 #undef __ |
| 850 } | 846 } |
| 851 } // namespace v8::internal | 847 } // namespace v8::internal |
| 852 | 848 |
| 853 #endif // V8_TARGET_ARCH_IA32 | 849 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |