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

Side by Side Diff: src/arm/stub-cache-arm.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/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 __ Push(r2, r0); 466 __ Push(r2, r0);
467 __ TailCallExternalReference( 467 __ TailCallExternalReference(
468 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage), 468 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage),
469 masm->isolate()), 469 masm->isolate()),
470 3, 470 3,
471 1); 471 1);
472 return; 472 return;
473 } 473 }
474 474
475 if (!transition.is_null()) { 475 if (!transition.is_null()) {
476 // Update the map of the object; no write barrier updating is 476 // Update the map of the object.
477 // needed because the map is never in new space. 477 __ mov(scratch, Operand(transition));
478 __ mov(ip, Operand(transition)); 478 __ str(scratch, FieldMemOperand(receiver_reg, HeapObject::kMapOffset));
479 __ str(ip, FieldMemOperand(receiver_reg, HeapObject::kMapOffset)); 479
480 // Update the write barrier for the map field and pass the now unused
481 // name_reg as scratch register.
482 __ RecordWriteField(receiver_reg,
483 HeapObject::kMapOffset,
484 scratch,
485 name_reg,
486 kLRHasNotBeenSaved,
487 kDontSaveFPRegs,
488 OMIT_REMEMBERED_SET,
489 OMIT_SMI_CHECK);
480 } 490 }
481 491
482 // Adjust for the number of properties stored in the object. Even in the 492 // Adjust for the number of properties stored in the object. Even in the
483 // face of a transition we can use the old map here because the size of the 493 // face of a transition we can use the old map here because the size of the
484 // object and the number of in-object properties is not going to change. 494 // object and the number of in-object properties is not going to change.
485 index -= object->map()->inobject_properties(); 495 index -= object->map()->inobject_properties();
486 496
487 if (index < 0) { 497 if (index < 0) {
488 // Set the property straight into the object. 498 // Set the property straight into the object.
489 int offset = object->map()->instance_size() + (index * kPointerSize); 499 int offset = object->map()->instance_size() + (index * kPointerSize);
(...skipping 4041 matching lines...) Expand 10 before | Expand all | Expand 10 after
4531 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4541 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4532 } 4542 }
4533 } 4543 }
4534 4544
4535 4545
4536 #undef __ 4546 #undef __
4537 4547
4538 } } // namespace v8::internal 4548 } } // namespace v8::internal
4539 4549
4540 #endif // V8_TARGET_ARCH_ARM 4550 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698