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

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

Issue 2087463004: Revert of [heap] Avoid the use of cells to point from code to new-space objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.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 // 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 #ifndef V8_HEAP_HEAP_INL_H_ 5 #ifndef V8_HEAP_HEAP_INL_H_
6 #define V8_HEAP_HEAP_INL_H_ 6 #define V8_HEAP_HEAP_INL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 419
420 void Heap::RecordWrite(Object* object, int offset, Object* o) { 420 void Heap::RecordWrite(Object* object, int offset, Object* o) {
421 if (!InNewSpace(o) || !object->IsHeapObject() || InNewSpace(object)) { 421 if (!InNewSpace(o) || !object->IsHeapObject() || InNewSpace(object)) {
422 return; 422 return;
423 } 423 }
424 RememberedSet<OLD_TO_NEW>::Insert( 424 RememberedSet<OLD_TO_NEW>::Insert(
425 Page::FromAddress(reinterpret_cast<Address>(object)), 425 Page::FromAddress(reinterpret_cast<Address>(object)),
426 HeapObject::cast(object)->address() + offset); 426 HeapObject::cast(object)->address() + offset);
427 } 427 }
428 428
429 void Heap::RecordWriteIntoCode(Code* host, RelocInfo* rinfo, Object* value) {
430 if (InNewSpace(value)) {
431 RecordWriteIntoCodeSlow(host, rinfo, value);
432 }
433 }
434
435 void Heap::RecordFixedArrayElements(FixedArray* array, int offset, int length) { 429 void Heap::RecordFixedArrayElements(FixedArray* array, int offset, int length) {
436 if (InNewSpace(array)) return; 430 if (InNewSpace(array)) return;
437 Page* page = Page::FromAddress(reinterpret_cast<Address>(array)); 431 Page* page = Page::FromAddress(reinterpret_cast<Address>(array));
438 for (int i = 0; i < length; i++) { 432 for (int i = 0; i < length; i++) {
439 if (!InNewSpace(array->get(offset + i))) continue; 433 if (!InNewSpace(array->get(offset + i))) continue;
440 RememberedSet<OLD_TO_NEW>::Insert( 434 RememberedSet<OLD_TO_NEW>::Insert(
441 page, 435 page,
442 reinterpret_cast<Address>(array->RawFieldOfElementAt(offset + i))); 436 reinterpret_cast<Address>(array->RawFieldOfElementAt(offset + i)));
443 } 437 }
444 } 438 }
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 761
768 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 762 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
769 for (Object** current = start; current < end; current++) { 763 for (Object** current = start; current < end; current++) {
770 CHECK((*current)->IsSmi()); 764 CHECK((*current)->IsSmi());
771 } 765 }
772 } 766 }
773 } // namespace internal 767 } // namespace internal
774 } // namespace v8 768 } // namespace v8
775 769
776 #endif // V8_HEAP_HEAP_INL_H_ 770 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698