Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 10443052: Fix missing write barrier in store field stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Vyacheslav Egorov. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 __ push(scratch); 761 __ push(scratch);
762 __ TailCallExternalReference( 762 __ TailCallExternalReference(
763 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage), 763 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage),
764 masm->isolate()), 764 masm->isolate()),
765 3, 765 3,
766 1); 766 1);
767 return; 767 return;
768 } 768 }
769 769
770 if (!transition.is_null()) { 770 if (!transition.is_null()) {
771 // Update the map of the object; no write barrier updating is 771 // Update the map of the object.
772 // needed because the map is never in new space. 772 __ Move(scratch, transition);
773 __ Move(FieldOperand(receiver_reg, HeapObject::kMapOffset), transition); 773 __ movq(FieldOperand(receiver_reg, HeapObject::kMapOffset), scratch);
774
775 // Update the write barrier for the map field and pass the now unused
776 // name_reg as scratch register.
777 __ RecordWriteField(receiver_reg,
778 HeapObject::kMapOffset,
779 scratch,
780 name_reg,
781 kDontSaveFPRegs,
782 OMIT_REMEMBERED_SET,
783 OMIT_SMI_CHECK);
774 } 784 }
775 785
776 // Adjust for the number of properties stored in the object. Even in the 786 // Adjust for the number of properties stored in the object. Even in the
777 // face of a transition we can use the old map here because the size of the 787 // face of a transition we can use the old map here because the size of the
778 // object and the number of in-object properties is not going to change. 788 // object and the number of in-object properties is not going to change.
779 index -= object->map()->inobject_properties(); 789 index -= object->map()->inobject_properties();
780 790
781 if (index < 0) { 791 if (index < 0) {
782 // Set the property straight into the object. 792 // Set the property straight into the object.
783 int offset = object->map()->instance_size() + (index * kPointerSize); 793 int offset = object->map()->instance_size() + (index * kPointerSize);
(...skipping 3068 matching lines...) Expand 10 before | Expand all | Expand 10 after
3852 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 3862 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
3853 } 3863 }
3854 } 3864 }
3855 3865
3856 3866
3857 #undef __ 3867 #undef __
3858 3868
3859 } } // namespace v8::internal 3869 } } // namespace v8::internal
3860 3870
3861 #endif // V8_TARGET_ARCH_X64 3871 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698