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

Side by Side Diff: src/objects-inl.h

Issue 2562683002: Merged: [heap] Reland: Use store buffer for writes coming from mutator. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « src/heap/store-buffer.cc ('k') | no next file » | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after
2593 return kWordAligned; 2593 return kWordAligned;
2594 } 2594 }
2595 2595
2596 2596
2597 void FixedArray::set(int index, 2597 void FixedArray::set(int index,
2598 Object* value, 2598 Object* value,
2599 WriteBarrierMode mode) { 2599 WriteBarrierMode mode) {
2600 DCHECK(map() != GetHeap()->fixed_cow_array_map()); 2600 DCHECK(map() != GetHeap()->fixed_cow_array_map());
2601 DCHECK(index >= 0 && index < this->length()); 2601 DCHECK(index >= 0 && index < this->length());
2602 int offset = kHeaderSize + index * kPointerSize; 2602 int offset = kHeaderSize + index * kPointerSize;
2603 WRITE_FIELD(this, offset, value); 2603 NOBARRIER_WRITE_FIELD(this, offset, value);
2604 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, offset, value, mode); 2604 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, offset, value, mode);
2605 } 2605 }
2606 2606
2607 2607
2608 void FixedArray::NoWriteBarrierSet(FixedArray* array, 2608 void FixedArray::NoWriteBarrierSet(FixedArray* array,
2609 int index, 2609 int index,
2610 Object* value) { 2610 Object* value) {
2611 DCHECK(array->map() != array->GetHeap()->fixed_cow_array_map()); 2611 DCHECK(array->map() != array->GetHeap()->fixed_cow_array_map());
2612 DCHECK(index >= 0 && index < array->length()); 2612 DCHECK(index >= 0 && index < array->length());
2613 DCHECK(!array->GetHeap()->InNewSpace(value)); 2613 DCHECK(!array->GetHeap()->InNewSpace(value));
2614 WRITE_FIELD(array, kHeaderSize + index * kPointerSize, value); 2614 NOBARRIER_WRITE_FIELD(array, kHeaderSize + index * kPointerSize, value);
2615 } 2615 }
2616 2616
2617 2617
2618 void FixedArray::set_undefined(int index) { 2618 void FixedArray::set_undefined(int index) {
2619 DCHECK(map() != GetHeap()->fixed_cow_array_map()); 2619 DCHECK(map() != GetHeap()->fixed_cow_array_map());
2620 DCHECK(index >= 0 && index < this->length()); 2620 DCHECK(index >= 0 && index < this->length());
2621 DCHECK(!GetHeap()->InNewSpace(GetHeap()->undefined_value())); 2621 DCHECK(!GetHeap()->InNewSpace(GetHeap()->undefined_value()));
2622 WRITE_FIELD(this, 2622 WRITE_FIELD(this,
2623 kHeaderSize + index * kPointerSize, 2623 kHeaderSize + index * kPointerSize,
2624 GetHeap()->undefined_value()); 2624 GetHeap()->undefined_value());
(...skipping 5815 matching lines...) Expand 10 before | Expand all | Expand 10 after
8440 #undef WRITE_INT64_FIELD 8440 #undef WRITE_INT64_FIELD
8441 #undef READ_BYTE_FIELD 8441 #undef READ_BYTE_FIELD
8442 #undef WRITE_BYTE_FIELD 8442 #undef WRITE_BYTE_FIELD
8443 #undef NOBARRIER_READ_BYTE_FIELD 8443 #undef NOBARRIER_READ_BYTE_FIELD
8444 #undef NOBARRIER_WRITE_BYTE_FIELD 8444 #undef NOBARRIER_WRITE_BYTE_FIELD
8445 8445
8446 } // namespace internal 8446 } // namespace internal
8447 } // namespace v8 8447 } // namespace v8
8448 8448
8449 #endif // V8_OBJECTS_INL_H_ 8449 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/heap/store-buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698