| 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 __ sdc1(f4, FieldMemOperand(storage_reg, HeapNumber::kValueOffset)); | 384 __ sdc1(f4, FieldMemOperand(storage_reg, HeapNumber::kValueOffset)); |
| 385 } | 385 } |
| 386 | 386 |
| 387 // Stub never generated for objects that require access checks. | 387 // Stub never generated for objects that require access checks. |
| 388 DCHECK(!transition->is_access_check_needed()); | 388 DCHECK(!transition->is_access_check_needed()); |
| 389 | 389 |
| 390 // Perform map transition for the receiver if necessary. | 390 // Perform map transition for the receiver if necessary. |
| 391 if (details.type() == FIELD && | 391 if (details.type() == FIELD && |
| 392 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0) { | 392 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0) { |
| 393 // The properties must be extended before we can store the value. | 393 // The properties must be extended before we can store the value. |
| 394 // We jump to a runtime call that extends the properties array. | 394 __ mov(ExtendStorageDescriptor::MapRegister(), Operand(transition)); |
| 395 __ push(receiver_reg); | 395 |
| 396 __ li(a2, Operand(transition)); | 396 ExtendStorageStub stub(isolate(), |
| 397 __ Push(a2, a0); | 397 FieldIndex::ForDescriptor(*transition, descriptor), |
| 398 __ TailCallExternalReference( | 398 representation); |
| 399 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage), | 399 GenerateTailCall(masm(), stub.GetCode()); |
| 400 isolate()), | |
| 401 3, 1); | |
| 402 return; | 400 return; |
| 403 } | 401 } |
| 404 | 402 |
| 405 // Update the map of the object. | 403 // Update the map of the object. |
| 406 __ li(scratch1, Operand(transition)); | 404 __ li(scratch1, Operand(transition)); |
| 407 __ sw(scratch1, FieldMemOperand(receiver_reg, HeapObject::kMapOffset)); | 405 __ sw(scratch1, FieldMemOperand(receiver_reg, HeapObject::kMapOffset)); |
| 408 | 406 |
| 409 // Update the write barrier for the map field. | 407 // Update the write barrier for the map field. |
| 410 __ RecordWriteField(receiver_reg, HeapObject::kMapOffset, scratch1, scratch2, | 408 __ RecordWriteField(receiver_reg, HeapObject::kMapOffset, scratch1, scratch2, |
| 411 kRAHasNotBeenSaved, kDontSaveFPRegs, OMIT_REMEMBERED_SET, | 409 kRAHasNotBeenSaved, kDontSaveFPRegs, OMIT_REMEMBERED_SET, |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 // Return the generated code. | 829 // Return the generated code. |
| 832 return GetCode(kind(), Code::NORMAL, name); | 830 return GetCode(kind(), Code::NORMAL, name); |
| 833 } | 831 } |
| 834 | 832 |
| 835 | 833 |
| 836 #undef __ | 834 #undef __ |
| 837 } | 835 } |
| 838 } // namespace v8::internal | 836 } // namespace v8::internal |
| 839 | 837 |
| 840 #endif // V8_TARGET_ARCH_MIPS | 838 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |