| 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 GenerateDictionaryNegativeLookup( | 500 GenerateDictionaryNegativeLookup( |
| 501 masm, miss_restore_name, holder_reg, name, scratch1, scratch2); | 501 masm, miss_restore_name, holder_reg, name, scratch1, scratch2); |
| 502 } | 502 } |
| 503 } | 503 } |
| 504 } | 504 } |
| 505 | 505 |
| 506 Register storage_reg = name_reg; | 506 Register storage_reg = name_reg; |
| 507 | 507 |
| 508 if (FLAG_track_fields && representation.IsSmi()) { | 508 if (FLAG_track_fields && representation.IsSmi()) { |
| 509 __ JumpIfNotSmi(value_reg, miss_restore_name); | 509 __ JumpIfNotSmi(value_reg, miss_restore_name); |
| 510 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 511 __ JumpIfSmi(value_reg, miss_restore_name); |
| 510 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 512 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
| 511 Label do_store, heap_number; | 513 Label do_store, heap_number; |
| 512 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex); | 514 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex); |
| 513 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow); | 515 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow); |
| 514 | 516 |
| 515 __ JumpIfNotSmi(value_reg, &heap_number); | 517 __ JumpIfNotSmi(value_reg, &heap_number); |
| 516 __ SmiUntag(scratch1, value_reg); | 518 __ SmiUntag(scratch1, value_reg); |
| 517 __ mtc1(scratch1, f6); | 519 __ mtc1(scratch1, f6); |
| 518 __ cvt_d_w(f4, f6); | 520 __ cvt_d_w(f4, f6); |
| 519 __ jmp(&do_store); | 521 __ jmp(&do_store); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 | 672 |
| 671 // Adjust for the number of properties stored in the object. Even in the | 673 // Adjust for the number of properties stored in the object. Even in the |
| 672 // face of a transition we can use the old map here because the size of the | 674 // face of a transition we can use the old map here because the size of the |
| 673 // object and the number of in-object properties is not going to change. | 675 // object and the number of in-object properties is not going to change. |
| 674 index -= object->map()->inobject_properties(); | 676 index -= object->map()->inobject_properties(); |
| 675 | 677 |
| 676 Representation representation = lookup->representation(); | 678 Representation representation = lookup->representation(); |
| 677 ASSERT(!representation.IsNone()); | 679 ASSERT(!representation.IsNone()); |
| 678 if (FLAG_track_fields && representation.IsSmi()) { | 680 if (FLAG_track_fields && representation.IsSmi()) { |
| 679 __ JumpIfNotSmi(value_reg, miss_label); | 681 __ JumpIfNotSmi(value_reg, miss_label); |
| 682 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 683 __ JumpIfSmi(value_reg, miss_label); |
| 680 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 684 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
| 681 // Load the double storage. | 685 // Load the double storage. |
| 682 if (index < 0) { | 686 if (index < 0) { |
| 683 int offset = object->map()->instance_size() + (index * kPointerSize); | 687 int offset = object->map()->instance_size() + (index * kPointerSize); |
| 684 __ lw(scratch1, FieldMemOperand(receiver_reg, offset)); | 688 __ lw(scratch1, FieldMemOperand(receiver_reg, offset)); |
| 685 } else { | 689 } else { |
| 686 __ lw(scratch1, | 690 __ lw(scratch1, |
| 687 FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset)); | 691 FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset)); |
| 688 int offset = index * kPointerSize + FixedArray::kHeaderSize; | 692 int offset = index * kPointerSize + FixedArray::kHeaderSize; |
| 689 __ lw(scratch1, FieldMemOperand(scratch1, offset)); | 693 __ lw(scratch1, FieldMemOperand(scratch1, offset)); |
| (...skipping 3170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3860 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); | 3864 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); |
| 3861 } | 3865 } |
| 3862 } | 3866 } |
| 3863 | 3867 |
| 3864 | 3868 |
| 3865 #undef __ | 3869 #undef __ |
| 3866 | 3870 |
| 3867 } } // namespace v8::internal | 3871 } } // namespace v8::internal |
| 3868 | 3872 |
| 3869 #endif // V8_TARGET_ARCH_MIPS | 3873 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |