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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 NoReg, MUTABLE); | 434 NoReg, MUTABLE); |
435 } | 435 } |
436 | 436 |
437 // Stub never generated for objects that require access checks. | 437 // Stub never generated for objects that require access checks. |
438 DCHECK(!transition->is_access_check_needed()); | 438 DCHECK(!transition->is_access_check_needed()); |
439 | 439 |
440 // Perform map transition for the receiver if necessary. | 440 // Perform map transition for the receiver if necessary. |
441 if (details.type() == FIELD && | 441 if (details.type() == FIELD && |
442 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0) { | 442 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0) { |
443 // The properties must be extended before we can store the value. | 443 // The properties must be extended before we can store the value. |
444 // We jump to a runtime call that extends the properties array. | 444 __ Mov(ExtendStorageDescriptor::MapRegister(), Operand(transition)); |
445 __ Mov(scratch1, Operand(transition)); | 445 |
446 __ Push(receiver_reg, scratch1, value_reg); | 446 ExtendStorageStub stub(isolate(), |
447 __ TailCallExternalReference( | 447 FieldIndex::ForDescriptor(*transition, descriptor), |
448 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage), | 448 representation); |
449 isolate()), | 449 GenerateTailCall(masm(), stub.GetCode()); |
450 3, 1); | |
451 return; | 450 return; |
452 } | 451 } |
453 | 452 |
454 // Update the map of the object. | 453 // Update the map of the object. |
455 __ Mov(scratch1, Operand(transition)); | 454 __ Mov(scratch1, Operand(transition)); |
456 __ Str(scratch1, FieldMemOperand(receiver_reg, HeapObject::kMapOffset)); | 455 __ Str(scratch1, FieldMemOperand(receiver_reg, HeapObject::kMapOffset)); |
457 | 456 |
458 // Update the write barrier for the map field. | 457 // Update the write barrier for the map field. |
459 __ RecordWriteField(receiver_reg, HeapObject::kMapOffset, scratch1, scratch2, | 458 __ RecordWriteField(receiver_reg, HeapObject::kMapOffset, scratch1, scratch2, |
460 kLRHasNotBeenSaved, kDontSaveFPRegs, OMIT_REMEMBERED_SET, | 459 kLRHasNotBeenSaved, kDontSaveFPRegs, OMIT_REMEMBERED_SET, |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 // Return the generated code. | 837 // Return the generated code. |
839 return GetCode(kind(), Code::FAST, name); | 838 return GetCode(kind(), Code::FAST, name); |
840 } | 839 } |
841 | 840 |
842 | 841 |
843 #undef __ | 842 #undef __ |
844 } | 843 } |
845 } // namespace v8::internal | 844 } // namespace v8::internal |
846 | 845 |
847 #endif // V8_TARGET_ARCH_IA32 | 846 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |