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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 GenerateDictionaryNegativeLookup( | 800 GenerateDictionaryNegativeLookup( |
801 masm, miss_restore_name, holder_reg, name, scratch1, scratch2); | 801 masm, miss_restore_name, holder_reg, name, scratch1, scratch2); |
802 } | 802 } |
803 } | 803 } |
804 } | 804 } |
805 | 805 |
806 Register storage_reg = name_reg; | 806 Register storage_reg = name_reg; |
807 | 807 |
808 if (FLAG_track_fields && representation.IsSmi()) { | 808 if (FLAG_track_fields && representation.IsSmi()) { |
809 __ JumpIfNotSmi(value_reg, miss_restore_name); | 809 __ JumpIfNotSmi(value_reg, miss_restore_name); |
| 810 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 811 __ JumpIfSmi(value_reg, miss_restore_name); |
810 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 812 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
811 Label do_store, heap_number; | 813 Label do_store, heap_number; |
812 __ AllocateHeapNumber(storage_reg, scratch1, slow); | 814 __ AllocateHeapNumber(storage_reg, scratch1, slow); |
813 | 815 |
814 __ JumpIfNotSmi(value_reg, &heap_number); | 816 __ JumpIfNotSmi(value_reg, &heap_number); |
815 __ SmiToInteger32(scratch1, value_reg); | 817 __ SmiToInteger32(scratch1, value_reg); |
816 __ cvtlsi2sd(xmm0, scratch1); | 818 __ cvtlsi2sd(xmm0, scratch1); |
817 __ jmp(&do_store); | 819 __ jmp(&do_store); |
818 | 820 |
819 __ bind(&heap_number); | 821 __ bind(&heap_number); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 | 948 |
947 // Adjust for the number of properties stored in the object. Even in the | 949 // Adjust for the number of properties stored in the object. Even in the |
948 // face of a transition we can use the old map here because the size of the | 950 // face of a transition we can use the old map here because the size of the |
949 // object and the number of in-object properties is not going to change. | 951 // object and the number of in-object properties is not going to change. |
950 index -= object->map()->inobject_properties(); | 952 index -= object->map()->inobject_properties(); |
951 | 953 |
952 Representation representation = lookup->representation(); | 954 Representation representation = lookup->representation(); |
953 ASSERT(!representation.IsNone()); | 955 ASSERT(!representation.IsNone()); |
954 if (FLAG_track_fields && representation.IsSmi()) { | 956 if (FLAG_track_fields && representation.IsSmi()) { |
955 __ JumpIfNotSmi(value_reg, miss_label); | 957 __ JumpIfNotSmi(value_reg, miss_label); |
| 958 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 959 __ JumpIfSmi(value_reg, miss_label); |
956 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 960 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
957 // Load the double storage. | 961 // Load the double storage. |
958 if (index < 0) { | 962 if (index < 0) { |
959 int offset = object->map()->instance_size() + (index * kPointerSize); | 963 int offset = object->map()->instance_size() + (index * kPointerSize); |
960 __ movq(scratch1, FieldOperand(receiver_reg, offset)); | 964 __ movq(scratch1, FieldOperand(receiver_reg, offset)); |
961 } else { | 965 } else { |
962 __ movq(scratch1, | 966 __ movq(scratch1, |
963 FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); | 967 FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); |
964 int offset = index * kPointerSize + FixedArray::kHeaderSize; | 968 int offset = index * kPointerSize + FixedArray::kHeaderSize; |
965 __ movq(scratch1, FieldOperand(scratch1, offset)); | 969 __ movq(scratch1, FieldOperand(scratch1, offset)); |
(...skipping 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3589 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); | 3593 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); |
3590 } | 3594 } |
3591 } | 3595 } |
3592 | 3596 |
3593 | 3597 |
3594 #undef __ | 3598 #undef __ |
3595 | 3599 |
3596 } } // namespace v8::internal | 3600 } } // namespace v8::internal |
3597 | 3601 |
3598 #endif // V8_TARGET_ARCH_X64 | 3602 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |