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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 // but may be destroyed if store is successful. | 739 // but may be destroyed if store is successful. |
740 void StubCompiler::GenerateStoreField(MacroAssembler* masm, | 740 void StubCompiler::GenerateStoreField(MacroAssembler* masm, |
741 Handle<JSObject> object, | 741 Handle<JSObject> object, |
742 int index, | 742 int index, |
743 Handle<Map> transition, | 743 Handle<Map> transition, |
744 Register receiver_reg, | 744 Register receiver_reg, |
745 Register name_reg, | 745 Register name_reg, |
746 Register scratch, | 746 Register scratch, |
747 Label* miss_label) { | 747 Label* miss_label) { |
748 // Check that the map of the object hasn't changed. | 748 // Check that the map of the object hasn't changed. |
| 749 CompareMapMode mode = transition.is_null() ? ALLOW_ELEMENT_TRANSITION_MAPS |
| 750 : REQUIRE_EXACT_MAP; |
749 __ CheckMap(receiver_reg, Handle<Map>(object->map()), | 751 __ CheckMap(receiver_reg, Handle<Map>(object->map()), |
750 miss_label, DO_SMI_CHECK, ALLOW_ELEMENT_TRANSITION_MAPS); | 752 miss_label, DO_SMI_CHECK, mode); |
751 | 753 |
752 // Perform global security token check if needed. | 754 // Perform global security token check if needed. |
753 if (object->IsJSGlobalProxy()) { | 755 if (object->IsJSGlobalProxy()) { |
754 __ CheckAccessGlobalProxy(receiver_reg, scratch, miss_label); | 756 __ CheckAccessGlobalProxy(receiver_reg, scratch, miss_label); |
755 } | 757 } |
756 | 758 |
757 // Stub never generated for non-global objects that require access | 759 // Stub never generated for non-global objects that require access |
758 // checks. | 760 // checks. |
759 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); | 761 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); |
760 | 762 |
(...skipping 3309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4070 __ jmp(ic_slow, RelocInfo::CODE_TARGET); | 4072 __ jmp(ic_slow, RelocInfo::CODE_TARGET); |
4071 } | 4073 } |
4072 } | 4074 } |
4073 | 4075 |
4074 | 4076 |
4075 #undef __ | 4077 #undef __ |
4076 | 4078 |
4077 } } // namespace v8::internal | 4079 } } // namespace v8::internal |
4078 | 4080 |
4079 #endif // V8_TARGET_ARCH_IA32 | 4081 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |