Commit 0d007e68 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[compiler] Change implementation of IsMaterializableFromRoot.

RootCanBeTreatedAsConstant checks that the object is not in new space.
This check is not thread-safe and, moreover, makes no sense in Turbofan.

R=bmeurer@chromium.org

Bug: v8:6048
Change-Id: I6df682ceef1508c33d5f32bd0d5bf25828e8c88f
Reviewed-on: https://chromium-review.googlesource.com/565259
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46509}
parent 0c22df65
......@@ -306,7 +306,7 @@ bool CodeGenerator::IsMaterializableFromRoot(
if (incoming_descriptor->flags() & CallDescriptor::kCanUseRoots) {
Heap* heap = isolate()->heap();
return heap->IsRootHandle(object, index_return) &&
heap->RootCanBeTreatedAsConstant(*index_return);
!heap->RootCanBeWrittenAfterInitialization(*index_return);
}
return false;
}
......
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