OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/ic/keyed-store-generic.h" | 5 #include "src/ic/keyed-store-generic.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stub-assembler.h" | 8 #include "src/code-stub-assembler.h" |
9 #include "src/contexts.h" | 9 #include "src/contexts.h" |
10 #include "src/ic/accessor-assembler.h" | 10 #include "src/ic/accessor-assembler.h" |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 // Accessor case. | 782 // Accessor case. |
783 // TODO(jkummerow): Implement a trimmed-down LoadAccessorFromFastObject. | 783 // TODO(jkummerow): Implement a trimmed-down LoadAccessorFromFastObject. |
784 VARIABLE(var_details, MachineRepresentation::kWord32); | 784 VARIABLE(var_details, MachineRepresentation::kWord32); |
785 LoadPropertyFromFastObject(receiver, receiver_map, descriptors, | 785 LoadPropertyFromFastObject(receiver, receiver_map, descriptors, |
786 name_index, &var_details, &var_accessor_pair); | 786 name_index, &var_details, &var_accessor_pair); |
787 var_accessor_holder.Bind(receiver); | 787 var_accessor_holder.Bind(receiver); |
788 Goto(&accessor); | 788 Goto(&accessor); |
789 | 789 |
790 BIND(&data_property); | 790 BIND(&data_property); |
791 { | 791 { |
| 792 CheckForAssociatedProtector(p->name, slow); |
792 OverwriteExistingFastProperty(receiver, receiver_map, properties, | 793 OverwriteExistingFastProperty(receiver, receiver_map, properties, |
793 descriptors, name_index, details, | 794 descriptors, name_index, details, |
794 p->value, slow); | 795 p->value, slow); |
795 Return(p->value); | 796 Return(p->value); |
796 } | 797 } |
797 } | 798 } |
798 } | 799 } |
799 | 800 |
800 BIND(&dictionary_properties); | 801 BIND(&dictionary_properties); |
801 { | 802 { |
(...skipping 13 matching lines...) Expand all Loading... |
815 JumpIfDataProperty(details, &overwrite, &readonly); | 816 JumpIfDataProperty(details, &overwrite, &readonly); |
816 | 817 |
817 // Accessor case. | 818 // Accessor case. |
818 var_accessor_pair.Bind(LoadValueByKeyIndex<NameDictionary>( | 819 var_accessor_pair.Bind(LoadValueByKeyIndex<NameDictionary>( |
819 properties, var_name_index.value())); | 820 properties, var_name_index.value())); |
820 var_accessor_holder.Bind(receiver); | 821 var_accessor_holder.Bind(receiver); |
821 Goto(&accessor); | 822 Goto(&accessor); |
822 | 823 |
823 BIND(&overwrite); | 824 BIND(&overwrite); |
824 { | 825 { |
| 826 CheckForAssociatedProtector(p->name, slow); |
825 StoreValueByKeyIndex<NameDictionary>(properties, var_name_index.value(), | 827 StoreValueByKeyIndex<NameDictionary>(properties, var_name_index.value(), |
826 p->value); | 828 p->value); |
827 Return(p->value); | 829 Return(p->value); |
828 } | 830 } |
829 } | 831 } |
830 | 832 |
831 BIND(¬_found); | 833 BIND(¬_found); |
832 { | 834 { |
| 835 CheckForAssociatedProtector(p->name, slow); |
833 Label extensible(this); | 836 Label extensible(this); |
834 GotoIf(IsPrivateSymbol(p->name), &extensible); | 837 GotoIf(IsPrivateSymbol(p->name), &extensible); |
835 Node* bitfield2 = LoadMapBitField2(receiver_map); | 838 Node* bitfield2 = LoadMapBitField2(receiver_map); |
836 Branch(IsSetWord32(bitfield2, 1 << Map::kIsExtensible), &extensible, | 839 Branch(IsSetWord32(bitfield2, 1 << Map::kIsExtensible), &extensible, |
837 slow); | 840 slow); |
838 | 841 |
839 BIND(&extensible); | 842 BIND(&extensible); |
840 LookupPropertyOnPrototypeChain(receiver_map, p->name, &accessor, | 843 LookupPropertyOnPrototypeChain(receiver_map, p->name, &accessor, |
841 &var_accessor_pair, &var_accessor_holder, | 844 &var_accessor_pair, &var_accessor_holder, |
842 &readonly, slow); | 845 &readonly, slow); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 StoreFixedArrayElement(vector, slot, | 999 StoreFixedArrayElement(vector, slot, |
997 LoadRoot(Heap::kuninitialized_symbolRootIndex), | 1000 LoadRoot(Heap::kuninitialized_symbolRootIndex), |
998 SKIP_WRITE_BARRIER, 0, SMI_PARAMETERS); | 1001 SKIP_WRITE_BARRIER, 0, SMI_PARAMETERS); |
999 TailCallRuntime(Runtime::kStoreIC_Miss, context, value, slot, vector, | 1002 TailCallRuntime(Runtime::kStoreIC_Miss, context, value, slot, vector, |
1000 receiver, name); | 1003 receiver, name); |
1001 } | 1004 } |
1002 } | 1005 } |
1003 | 1006 |
1004 } // namespace internal | 1007 } // namespace internal |
1005 } // namespace v8 | 1008 } // namespace v8 |
OLD | NEW |