Commit ba35cd5f authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

Revert "Document RootIndexMap's requirement for immovable roots."

This reverts commit bb881c88.

Reason for revert: nosnap debug:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/13930

Original change's description:
> Document RootIndexMap's requirement for immovable roots.
> 
> R=​mstarzinger@chromium.org
> 
> Change-Id: I27cf279c77204becc449221e1bcebeacbc275792
> Reviewed-on: https://chromium-review.googlesource.com/565281
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46517}

TBR=yangguo@chromium.org,mstarzinger@chromium.org

Change-Id: Ifac3ec6192207bf2be8932408c37bea66bb435e8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/565598Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46522}
parent 2ce135af
......@@ -20,8 +20,6 @@ RootIndexMap::RootIndexMap(Isolate* isolate) {
if (!root->IsHeapObject()) continue;
// Omit root entries that can be written after initialization. They must
// not be referenced through the root list in the snapshot.
// Since we map the raw address of an root item to its root list index, the
// raw address must be constant, i.e. the object must be immovable.
if (isolate->heap()->RootCanBeTreatedAsConstant(root_index)) {
HeapObject* heap_object = HeapObject::cast(root);
Maybe<uint32_t> maybe_index = map_->Get(heap_object);
......
......@@ -2910,10 +2910,8 @@ bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) {
}
bool Heap::RootCanBeTreatedAsConstant(RootListIndex root_index) {
bool can_be = !RootCanBeWrittenAfterInitialization(root_index) &&
!InNewSpace(root(root_index));
DCHECK_IMPLIES(can_be, IsImmovable(HeapObject::cast(root(root_index))));
return can_be;
return !RootCanBeWrittenAfterInitialization(root_index) &&
!InNewSpace(root(root_index));
}
int Heap::FullSizeNumberStringCacheLength() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment