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

Side by Side Diff: src/ia32/stub-cache-ia32.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/ia32/lithium-ia32.cc ('k') | src/mips/lithium-codegen-mips.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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 __ push(scratch); 775 __ push(scratch);
776 __ TailCallExternalReference( 776 __ TailCallExternalReference(
777 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage), 777 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage),
778 masm->isolate()), 778 masm->isolate()),
779 3, 779 3,
780 1); 780 1);
781 return; 781 return;
782 } 782 }
783 783
784 if (!transition.is_null()) { 784 if (!transition.is_null()) {
785 // Update the map of the object; no write barrier updating is 785 // Update the map of the object.
786 // needed because the map is never in new space. 786 __ mov(scratch, Immediate(transition));
787 __ mov(FieldOperand(receiver_reg, HeapObject::kMapOffset), 787 __ mov(FieldOperand(receiver_reg, HeapObject::kMapOffset), scratch);
788 Immediate(transition)); 788
789 // Update the write barrier for the map field and pass the now unused
790 // name_reg as scratch register.
791 __ RecordWriteField(receiver_reg,
792 HeapObject::kMapOffset,
793 scratch,
794 name_reg,
795 kDontSaveFPRegs,
796 OMIT_REMEMBERED_SET,
797 OMIT_SMI_CHECK);
789 } 798 }
790 799
791 // Adjust for the number of properties stored in the object. Even in the 800 // Adjust for the number of properties stored in the object. Even in the
792 // face of a transition we can use the old map here because the size of the 801 // face of a transition we can use the old map here because the size of the
793 // object and the number of in-object properties is not going to change. 802 // object and the number of in-object properties is not going to change.
794 index -= object->map()->inobject_properties(); 803 index -= object->map()->inobject_properties();
795 804
796 if (index < 0) { 805 if (index < 0) {
797 // Set the property straight into the object. 806 // Set the property straight into the object.
798 int offset = object->map()->instance_size() + (index * kPointerSize); 807 int offset = object->map()->instance_size() + (index * kPointerSize);
(...skipping 3297 matching lines...) Expand 10 before | Expand all | Expand 10 after
4096 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 4105 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
4097 } 4106 }
4098 } 4107 }
4099 4108
4100 4109
4101 #undef __ 4110 #undef __
4102 4111
4103 } } // namespace v8::internal 4112 } } // namespace v8::internal
4104 4113
4105 #endif // V8_TARGET_ARCH_IA32 4114 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698