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

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

Issue 19779002: Merged r15577 into 3.19 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.19
Patch Set: Created 7 years, 5 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 | « no previous file | src/version.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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 if (index < 0) { 587 if (index < 0) {
588 // Set the property straight into the object. 588 // Set the property straight into the object.
589 int offset = object->map()->instance_size() + (index * kPointerSize); 589 int offset = object->map()->instance_size() + (index * kPointerSize);
590 if (FLAG_track_double_fields && representation.IsDouble()) { 590 if (FLAG_track_double_fields && representation.IsDouble()) {
591 __ sw(storage_reg, FieldMemOperand(receiver_reg, offset)); 591 __ sw(storage_reg, FieldMemOperand(receiver_reg, offset));
592 } else { 592 } else {
593 __ sw(value_reg, FieldMemOperand(receiver_reg, offset)); 593 __ sw(value_reg, FieldMemOperand(receiver_reg, offset));
594 } 594 }
595 595
596 if (!FLAG_track_fields || !representation.IsSmi()) { 596 if (!FLAG_track_fields || !representation.IsSmi()) {
597 // Skip updating write barrier if storing a smi.
598 __ JumpIfSmi(value_reg, &exit);
599
600 // Update the write barrier for the array address. 597 // Update the write barrier for the array address.
601 // Pass the now unused name_reg as a scratch register. 598 // Pass the now unused name_reg as a scratch register.
602 if (!FLAG_track_double_fields || !representation.IsDouble()) { 599 if (!FLAG_track_double_fields || !representation.IsDouble()) {
603 __ mov(name_reg, value_reg); 600 __ mov(name_reg, value_reg);
604 } else { 601 } else {
605 ASSERT(storage_reg.is(name_reg)); 602 ASSERT(storage_reg.is(name_reg));
606 } 603 }
607 __ RecordWriteField(receiver_reg, 604 __ RecordWriteField(receiver_reg,
608 offset, 605 offset,
609 name_reg, 606 name_reg,
610 scratch1, 607 scratch1,
611 kRAHasNotBeenSaved, 608 kRAHasNotBeenSaved,
612 kDontSaveFPRegs, 609 kDontSaveFPRegs,
613 EMIT_REMEMBERED_SET, 610 EMIT_REMEMBERED_SET,
614 smi_check); 611 smi_check);
615 } 612 }
616 } else { 613 } else {
617 // Write to the properties array. 614 // Write to the properties array.
618 int offset = index * kPointerSize + FixedArray::kHeaderSize; 615 int offset = index * kPointerSize + FixedArray::kHeaderSize;
619 // Get the properties array 616 // Get the properties array
620 __ lw(scratch1, 617 __ lw(scratch1,
621 FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset)); 618 FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset));
622 if (FLAG_track_double_fields && representation.IsDouble()) { 619 if (FLAG_track_double_fields && representation.IsDouble()) {
623 __ sw(storage_reg, FieldMemOperand(scratch1, offset)); 620 __ sw(storage_reg, FieldMemOperand(scratch1, offset));
624 } else { 621 } else {
625 __ sw(value_reg, FieldMemOperand(scratch1, offset)); 622 __ sw(value_reg, FieldMemOperand(scratch1, offset));
626 } 623 }
627 624
628 if (!FLAG_track_fields || !representation.IsSmi()) { 625 if (!FLAG_track_fields || !representation.IsSmi()) {
629 // Skip updating write barrier if storing a smi.
630 __ JumpIfSmi(value_reg, &exit);
631
632 // Update the write barrier for the array address. 626 // Update the write barrier for the array address.
633 // Ok to clobber receiver_reg and name_reg, since we return. 627 // Ok to clobber receiver_reg and name_reg, since we return.
634 if (!FLAG_track_double_fields || !representation.IsDouble()) { 628 if (!FLAG_track_double_fields || !representation.IsDouble()) {
635 __ mov(name_reg, value_reg); 629 __ mov(name_reg, value_reg);
636 } else { 630 } else {
637 ASSERT(storage_reg.is(name_reg)); 631 ASSERT(storage_reg.is(name_reg));
638 } 632 }
639 __ RecordWriteField(scratch1, 633 __ RecordWriteField(scratch1,
640 offset, 634 offset,
641 name_reg, 635 name_reg,
(...skipping 3136 matching lines...) Expand 10 before | Expand all | Expand 10 after
3778 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3772 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3779 } 3773 }
3780 } 3774 }
3781 3775
3782 3776
3783 #undef __ 3777 #undef __
3784 3778
3785 } } // namespace v8::internal 3779 } } // namespace v8::internal
3786 3780
3787 #endif // V8_TARGET_ARCH_MIPS 3781 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698