Commit adc47bc5 authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[heap] Create all builtin RelocInfo in RO_SPACE

When creating a Code object, if it has valid builtin_index then create
its RelocInfo in RO_SPACE. For embedded builds this moves about 48 bytes
into RO_SPACE, but it's considerably more for nosnap builds.

Bug: v8:7464
Change-Id: I598cb960c0068ef4be8d72ae8f5c8d74c0195aca
Reviewed-on: https://chromium-review.googlesource.com/c/1299073Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57016}
parent 12427d0d
......@@ -2569,7 +2569,9 @@ MaybeHandle<Code> Factory::TryNewCode(
uint32_t stub_key, bool is_turbofanned, int stack_slots,
int safepoint_table_offset, int handler_table_offset) {
// Allocate objects needed for code initialization.
Handle<ByteArray> reloc_info = NewByteArray(desc.reloc_size, TENURED);
Handle<ByteArray> reloc_info = NewByteArray(
desc.reloc_size,
Builtins::IsBuiltinId(builtin_index) ? TENURED_READ_ONLY : TENURED);
Handle<CodeDataContainer> data_container = NewCodeDataContainer(0);
Handle<ByteArray> source_position_table =
maybe_source_position_table.is_null()
......@@ -2619,7 +2621,9 @@ Handle<Code> Factory::NewCode(
uint32_t stub_key, bool is_turbofanned, int stack_slots,
int safepoint_table_offset, int handler_table_offset) {
// Allocate objects needed for code initialization.
Handle<ByteArray> reloc_info = NewByteArray(desc.reloc_size, TENURED);
Handle<ByteArray> reloc_info = NewByteArray(
desc.reloc_size,
Builtins::IsBuiltinId(builtin_index) ? TENURED_READ_ONLY : TENURED);
Handle<CodeDataContainer> data_container = NewCodeDataContainer(0);
Handle<ByteArray> source_position_table =
maybe_source_position_table.is_null()
......
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