| 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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 miss_restore_name); | 832 miss_restore_name); |
| 833 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) { | 833 } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) { |
| 834 GenerateDictionaryNegativeLookup( | 834 GenerateDictionaryNegativeLookup( |
| 835 masm, miss_restore_name, holder_reg, name, scratch1, scratch2); | 835 masm, miss_restore_name, holder_reg, name, scratch1, scratch2); |
| 836 } | 836 } |
| 837 } | 837 } |
| 838 } | 838 } |
| 839 | 839 |
| 840 Register storage_reg = name_reg; | 840 Register storage_reg = name_reg; |
| 841 | 841 |
| 842 if (FLAG_track_fields && representation.IsSmi()) { | 842 if (details.type() == CONSTANT_FUNCTION) { |
| 843 __ JumpIfNotSmi(value_reg, miss_restore_name); | 843 Handle<HeapObject> constant( |
| 844 HeapObject::cast(descriptors->GetValue(descriptor))); |
| 845 __ LoadHeapObject(scratch1, constant); |
| 846 __ cmp(value_reg, scratch1); |
| 847 __ j(not_equal, miss_restore_name); |
| 848 } else if (FLAG_track_fields && representation.IsSmi()) { |
| 849 __ JumpIfNotSmi(value_reg, miss_restore_name); |
| 844 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { | 850 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 845 __ JumpIfSmi(value_reg, miss_restore_name); | 851 __ JumpIfSmi(value_reg, miss_restore_name); |
| 846 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 852 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
| 847 Label do_store, heap_number; | 853 Label do_store, heap_number; |
| 848 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, slow); | 854 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, slow); |
| 849 | 855 |
| 850 __ JumpIfNotSmi(value_reg, &heap_number); | 856 __ JumpIfNotSmi(value_reg, &heap_number); |
| 851 __ SmiUntag(value_reg); | 857 __ SmiUntag(value_reg); |
| 852 if (CpuFeatures::IsSupported(SSE2)) { | 858 if (CpuFeatures::IsSupported(SSE2)) { |
| 853 CpuFeatureScope use_sse2(masm, SSE2); | 859 CpuFeatureScope use_sse2(masm, SSE2); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 | 912 |
| 907 // Update the write barrier for the map field. | 913 // Update the write barrier for the map field. |
| 908 __ RecordWriteField(receiver_reg, | 914 __ RecordWriteField(receiver_reg, |
| 909 HeapObject::kMapOffset, | 915 HeapObject::kMapOffset, |
| 910 scratch1, | 916 scratch1, |
| 911 scratch2, | 917 scratch2, |
| 912 kDontSaveFPRegs, | 918 kDontSaveFPRegs, |
| 913 OMIT_REMEMBERED_SET, | 919 OMIT_REMEMBERED_SET, |
| 914 OMIT_SMI_CHECK); | 920 OMIT_SMI_CHECK); |
| 915 | 921 |
| 922 if (details.type() == CONSTANT_FUNCTION) return; |
| 923 |
| 916 int index = transition->instance_descriptors()->GetFieldIndex( | 924 int index = transition->instance_descriptors()->GetFieldIndex( |
| 917 transition->LastAdded()); | 925 transition->LastAdded()); |
| 918 | 926 |
| 919 // Adjust for the number of properties stored in the object. Even in the | 927 // Adjust for the number of properties stored in the object. Even in the |
| 920 // face of a transition we can use the old map here because the size of the | 928 // face of a transition we can use the old map here because the size of the |
| 921 // object and the number of in-object properties is not going to change. | 929 // object and the number of in-object properties is not going to change. |
| 922 index -= object->map()->inobject_properties(); | 930 index -= object->map()->inobject_properties(); |
| 923 | 931 |
| 924 SmiCheck smi_check = representation.IsTagged() | 932 SmiCheck smi_check = representation.IsTagged() |
| 925 ? INLINE_SMI_CHECK : OMIT_SMI_CHECK; | 933 ? INLINE_SMI_CHECK : OMIT_SMI_CHECK; |
| (...skipping 2817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3743 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); | 3751 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); |
| 3744 } | 3752 } |
| 3745 } | 3753 } |
| 3746 | 3754 |
| 3747 | 3755 |
| 3748 #undef __ | 3756 #undef __ |
| 3749 | 3757 |
| 3750 } } // namespace v8::internal | 3758 } } // namespace v8::internal |
| 3751 | 3759 |
| 3752 #endif // V8_TARGET_ARCH_IA32 | 3760 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |