| 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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 GenerateDictionaryNegativeLookup( | 819 GenerateDictionaryNegativeLookup( |
| 820 masm, miss_restore_name, holder_reg, name, scratch1, scratch2); | 820 masm, miss_restore_name, holder_reg, name, scratch1, scratch2); |
| 821 } | 821 } |
| 822 } | 822 } |
| 823 } | 823 } |
| 824 | 824 |
| 825 Register storage_reg = name_reg; | 825 Register storage_reg = name_reg; |
| 826 | 826 |
| 827 if (FLAG_track_fields && representation.IsSmi()) { | 827 if (FLAG_track_fields && representation.IsSmi()) { |
| 828 __ JumpIfNotSmi(value_reg, miss_restore_name); | 828 __ JumpIfNotSmi(value_reg, miss_restore_name); |
| 829 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 830 __ JumpIfSmi(value_reg, miss_restore_name); |
| 829 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 831 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
| 830 Label do_store, heap_number; | 832 Label do_store, heap_number; |
| 831 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, slow); | 833 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, slow); |
| 832 | 834 |
| 833 __ JumpIfNotSmi(value_reg, &heap_number); | 835 __ JumpIfNotSmi(value_reg, &heap_number); |
| 834 __ SmiUntag(value_reg); | 836 __ SmiUntag(value_reg); |
| 835 if (CpuFeatures::IsSupported(SSE2)) { | 837 if (CpuFeatures::IsSupported(SSE2)) { |
| 836 CpuFeatureScope use_sse2(masm, SSE2); | 838 CpuFeatureScope use_sse2(masm, SSE2); |
| 837 __ cvtsi2sd(xmm0, value_reg); | 839 __ cvtsi2sd(xmm0, value_reg); |
| 838 } else { | 840 } else { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 | 991 |
| 990 // Adjust for the number of properties stored in the object. Even in the | 992 // Adjust for the number of properties stored in the object. Even in the |
| 991 // face of a transition we can use the old map here because the size of the | 993 // face of a transition we can use the old map here because the size of the |
| 992 // object and the number of in-object properties is not going to change. | 994 // object and the number of in-object properties is not going to change. |
| 993 index -= object->map()->inobject_properties(); | 995 index -= object->map()->inobject_properties(); |
| 994 | 996 |
| 995 Representation representation = lookup->representation(); | 997 Representation representation = lookup->representation(); |
| 996 ASSERT(!representation.IsNone()); | 998 ASSERT(!representation.IsNone()); |
| 997 if (FLAG_track_fields && representation.IsSmi()) { | 999 if (FLAG_track_fields && representation.IsSmi()) { |
| 998 __ JumpIfNotSmi(value_reg, miss_label); | 1000 __ JumpIfNotSmi(value_reg, miss_label); |
| 1001 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 1002 __ JumpIfSmi(value_reg, miss_label); |
| 999 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 1003 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
| 1000 // Load the double storage. | 1004 // Load the double storage. |
| 1001 if (index < 0) { | 1005 if (index < 0) { |
| 1002 int offset = object->map()->instance_size() + (index * kPointerSize); | 1006 int offset = object->map()->instance_size() + (index * kPointerSize); |
| 1003 __ mov(scratch1, FieldOperand(receiver_reg, offset)); | 1007 __ mov(scratch1, FieldOperand(receiver_reg, offset)); |
| 1004 } else { | 1008 } else { |
| 1005 __ mov(scratch1, FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); | 1009 __ mov(scratch1, FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); |
| 1006 int offset = index * kPointerSize + FixedArray::kHeaderSize; | 1010 int offset = index * kPointerSize + FixedArray::kHeaderSize; |
| 1007 __ mov(scratch1, FieldOperand(scratch1, offset)); | 1011 __ mov(scratch1, FieldOperand(scratch1, offset)); |
| 1008 } | 1012 } |
| (...skipping 2835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3844 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); | 3848 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); |
| 3845 } | 3849 } |
| 3846 } | 3850 } |
| 3847 | 3851 |
| 3848 | 3852 |
| 3849 #undef __ | 3853 #undef __ |
| 3850 | 3854 |
| 3851 } } // namespace v8::internal | 3855 } } // namespace v8::internal |
| 3852 | 3856 |
| 3853 #endif // V8_TARGET_ARCH_IA32 | 3857 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |