| 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 miss_restore_name); | 505 miss_restore_name); |
| 506 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) { | 506 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) { |
| 507 GenerateDictionaryNegativeLookup( | 507 GenerateDictionaryNegativeLookup( |
| 508 masm, miss_restore_name, holder_reg, name, scratch1, scratch2); | 508 masm, miss_restore_name, holder_reg, name, scratch1, scratch2); |
| 509 } | 509 } |
| 510 } | 510 } |
| 511 } | 511 } |
| 512 | 512 |
| 513 Register storage_reg = name_reg; | 513 Register storage_reg = name_reg; |
| 514 | 514 |
| 515 if (FLAG_track_fields && representation.IsSmi()) { | 515 if (details.type() == CONSTANT_FUNCTION) { |
| 516 Handle<HeapObject> constant( |
| 517 HeapObject::cast(descriptors->GetValue(descriptor))); |
| 518 __ LoadHeapObject(scratch1, constant); |
| 519 __ cmp(value_reg, scratch1); |
| 520 __ b(ne, miss_restore_name); |
| 521 } else if (FLAG_track_fields && representation.IsSmi()) { |
| 516 __ JumpIfNotSmi(value_reg, miss_restore_name); | 522 __ JumpIfNotSmi(value_reg, miss_restore_name); |
| 517 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { | 523 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 518 __ JumpIfSmi(value_reg, miss_restore_name); | 524 __ JumpIfSmi(value_reg, miss_restore_name); |
| 519 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 525 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
| 520 Label do_store, heap_number; | 526 Label do_store, heap_number; |
| 521 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex); | 527 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex); |
| 522 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow); | 528 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow); |
| 523 | 529 |
| 524 __ JumpIfNotSmi(value_reg, &heap_number); | 530 __ JumpIfNotSmi(value_reg, &heap_number); |
| 525 __ SmiUntag(scratch1, value_reg); | 531 __ SmiUntag(scratch1, value_reg); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 // name_reg as scratch register. | 569 // name_reg as scratch register. |
| 564 __ RecordWriteField(receiver_reg, | 570 __ RecordWriteField(receiver_reg, |
| 565 HeapObject::kMapOffset, | 571 HeapObject::kMapOffset, |
| 566 scratch1, | 572 scratch1, |
| 567 scratch2, | 573 scratch2, |
| 568 kLRHasNotBeenSaved, | 574 kLRHasNotBeenSaved, |
| 569 kDontSaveFPRegs, | 575 kDontSaveFPRegs, |
| 570 OMIT_REMEMBERED_SET, | 576 OMIT_REMEMBERED_SET, |
| 571 OMIT_SMI_CHECK); | 577 OMIT_SMI_CHECK); |
| 572 | 578 |
| 579 if (details.type() == CONSTANT_FUNCTION) return; |
| 580 |
| 573 int index = transition->instance_descriptors()->GetFieldIndex( | 581 int index = transition->instance_descriptors()->GetFieldIndex( |
| 574 transition->LastAdded()); | 582 transition->LastAdded()); |
| 575 | 583 |
| 576 // Adjust for the number of properties stored in the object. Even in the | 584 // Adjust for the number of properties stored in the object. Even in the |
| 577 // face of a transition we can use the old map here because the size of the | 585 // face of a transition we can use the old map here because the size of the |
| 578 // object and the number of in-object properties is not going to change. | 586 // object and the number of in-object properties is not going to change. |
| 579 index -= object->map()->inobject_properties(); | 587 index -= object->map()->inobject_properties(); |
| 580 | 588 |
| 581 // TODO(verwaest): Share this code as a code stub. | 589 // TODO(verwaest): Share this code as a code stub. |
| 582 SmiCheck smi_check = representation.IsTagged() | 590 SmiCheck smi_check = representation.IsTagged() |
| (...skipping 3054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3637 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); | 3645 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); |
| 3638 } | 3646 } |
| 3639 } | 3647 } |
| 3640 | 3648 |
| 3641 | 3649 |
| 3642 #undef __ | 3650 #undef __ |
| 3643 | 3651 |
| 3644 } } // namespace v8::internal | 3652 } } // namespace v8::internal |
| 3645 | 3653 |
| 3646 #endif // V8_TARGET_ARCH_ARM | 3654 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |