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

Side by Side Diff: src/mips/lithium-codegen-mips.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/stub-cache-ia32.cc ('k') | src/mips/lithium-mips.h » ('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 3437 matching lines...) Expand 10 before | Expand all | Expand 10 after
3448 Register object = ToRegister(instr->object()); 3448 Register object = ToRegister(instr->object());
3449 Register value = ToRegister(instr->value()); 3449 Register value = ToRegister(instr->value());
3450 Register scratch = scratch0(); 3450 Register scratch = scratch0();
3451 int offset = instr->offset(); 3451 int offset = instr->offset();
3452 3452
3453 ASSERT(!object.is(value)); 3453 ASSERT(!object.is(value));
3454 3454
3455 if (!instr->transition().is_null()) { 3455 if (!instr->transition().is_null()) {
3456 __ li(scratch, Operand(instr->transition())); 3456 __ li(scratch, Operand(instr->transition()));
3457 __ sw(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 3457 __ sw(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
3458 if (instr->hydrogen()->NeedsWriteBarrierForMap()) {
3459 Register temp = ToRegister(instr->TempAt(0));
3460 // Update the write barrier for the map field.
3461 __ RecordWriteField(object,
3462 HeapObject::kMapOffset,
3463 scratch,
3464 temp,
3465 kRAHasBeenSaved,
3466 kSaveFPRegs,
3467 OMIT_REMEMBERED_SET,
3468 OMIT_SMI_CHECK);
3469 }
3458 } 3470 }
3459 3471
3460 // Do the store. 3472 // Do the store.
3461 HType type = instr->hydrogen()->value()->type(); 3473 HType type = instr->hydrogen()->value()->type();
3462 SmiCheck check_needed = 3474 SmiCheck check_needed =
3463 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; 3475 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
3464 if (instr->is_in_object()) { 3476 if (instr->is_in_object()) {
3465 __ sw(value, FieldMemOperand(object, offset)); 3477 __ sw(value, FieldMemOperand(object, offset));
3466 if (instr->hydrogen()->NeedsWriteBarrier()) { 3478 if (instr->hydrogen()->NeedsWriteBarrier()) {
3467 // Update the write barrier for the object for in-object properties. 3479 // Update the write barrier for the object for in-object properties.
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after
5163 __ Subu(scratch, result, scratch); 5175 __ Subu(scratch, result, scratch);
5164 __ lw(result, FieldMemOperand(scratch, 5176 __ lw(result, FieldMemOperand(scratch,
5165 FixedArray::kHeaderSize - kPointerSize)); 5177 FixedArray::kHeaderSize - kPointerSize));
5166 __ bind(&done); 5178 __ bind(&done);
5167 } 5179 }
5168 5180
5169 5181
5170 #undef __ 5182 #undef __
5171 5183
5172 } } // namespace v8::internal 5184 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698