Commit 79e60c93 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

Rename ShouldLoadConstantsFromRootList() ...

to IsGeneratingEmbeddedBuiltins() to clarify its meaning.

Bug: v8:6666
Change-Id: I8b282f29775a103a03f502c3e9629b40b4a690bd
Reviewed-on: https://chromium-review.googlesource.com/c/1480380Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59815}
parent 4b0c2b32
......@@ -68,7 +68,7 @@ AssemblerOptions AssemblerOptions::Default(
const bool serializer =
isolate->serializer_enabled() || explicitly_support_serialization;
const bool generating_embedded_builtin =
isolate->ShouldLoadConstantsFromRootList();
isolate->IsGeneratingEmbeddedBuiltins();
options.record_reloc_info_for_serialization = serializer;
options.enable_root_array_delta_access =
!serializer && !generating_embedded_builtin;
......
......@@ -39,7 +39,7 @@ uint32_t BuiltinsConstantsTableBuilder::AddObject(Handle<Object> object) {
DCHECK(ThreadId::Current().Equals(isolate_->thread_id()));
// Must be generating embedded builtin code.
DCHECK(isolate_->ShouldLoadConstantsFromRootList());
DCHECK(isolate_->IsGeneratingEmbeddedBuiltins());
// All code objects should be loaded through the root register or use
// pc-relative addressing.
......@@ -69,7 +69,7 @@ void BuiltinsConstantsTableBuilder::PatchSelfReference(
DCHECK_EQ(ReadOnlyRoots(isolate_).empty_fixed_array(),
isolate_->heap()->builtins_constants_table());
DCHECK(isolate_->ShouldLoadConstantsFromRootList());
DCHECK(isolate_->IsGeneratingEmbeddedBuiltins());
DCHECK(self_reference->IsOddball());
DCHECK(Oddball::cast(*self_reference)->kind() ==
......@@ -88,7 +88,7 @@ void BuiltinsConstantsTableBuilder::Finalize() {
DCHECK_EQ(ReadOnlyRoots(isolate_).empty_fixed_array(),
isolate_->heap()->builtins_constants_table());
DCHECK(isolate_->ShouldLoadConstantsFromRootList());
DCHECK(isolate_->IsGeneratingEmbeddedBuiltins());
// An empty map means there's nothing to do.
if (map_.size() == 0) return;
......
......@@ -42,7 +42,7 @@ AssemblerOptions BuiltinAssemblerOptions(Isolate* isolate,
CHECK(!options.isolate_independent_code);
CHECK(!options.use_pc_relative_calls_and_jumps);
if (!isolate->ShouldLoadConstantsFromRootList() ||
if (!isolate->IsGeneratingEmbeddedBuiltins() ||
!Builtins::IsIsolateIndependent(builtin_index)) {
return options;
}
......
......@@ -1608,7 +1608,7 @@ struct InstructionSelectionPhase {
? InstructionSelector::kEnableScheduling
: InstructionSelector::kDisableScheduling,
!data->isolate() || data->isolate()->serializer_enabled() ||
data->isolate()->ShouldLoadConstantsFromRootList()
data->isolate()->IsGeneratingEmbeddedBuiltins()
? InstructionSelector::kDisableRootsRelativeAddressing
: InstructionSelector::kEnableRootsRelativeAddressing,
data->info()->GetPoisoningMitigationLevel(),
......
......@@ -1359,8 +1359,7 @@ class Isolate final : private HiddenFactory {
// Off-heap builtins cannot embed constants within the code object itself,
// and thus need to load them from the root list.
// TODO(jgruber): Rename to IsGeneratingEmbeddedBuiltins().
bool ShouldLoadConstantsFromRootList() const {
bool IsGeneratingEmbeddedBuiltins() const {
return FLAG_embedded_builtins &&
builtins_constants_table_builder() != nullptr;
}
......
......@@ -1044,7 +1044,7 @@ void RegExpMacroAssemblerARM::WriteStackPointerToRegister(int reg) {
// Private methods:
void RegExpMacroAssemblerARM::CallCheckStackGuardState() {
DCHECK(!isolate()->ShouldLoadConstantsFromRootList());
DCHECK(!isolate()->IsGeneratingEmbeddedBuiltins());
DCHECK(!masm_->options().isolate_independent_code);
__ PrepareCallCFunction(3);
......
......@@ -1347,7 +1347,7 @@ void RegExpMacroAssemblerARM64::CheckPosition(int cp_offset,
// Private methods:
void RegExpMacroAssemblerARM64::CallCheckStackGuardState(Register scratch) {
DCHECK(!isolate()->ShouldLoadConstantsFromRootList());
DCHECK(!isolate()->IsGeneratingEmbeddedBuiltins());
DCHECK(!masm_->options().isolate_independent_code);
// Allocate space on the stack to store the return address. The
......
......@@ -1087,7 +1087,7 @@ bool RegExpMacroAssemblerMIPS::CanReadUnaligned() {
// Private methods:
void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch) {
DCHECK(!isolate()->ShouldLoadConstantsFromRootList());
DCHECK(!isolate()->IsGeneratingEmbeddedBuiltins());
DCHECK(!masm_->options().isolate_independent_code);
int stack_alignment = base::OS::ActivationFrameAlignment();
......
......@@ -1124,7 +1124,7 @@ bool RegExpMacroAssemblerMIPS::CanReadUnaligned() {
// Private methods:
void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch) {
DCHECK(!isolate()->ShouldLoadConstantsFromRootList());
DCHECK(!isolate()->IsGeneratingEmbeddedBuiltins());
DCHECK(!masm_->options().isolate_independent_code);
int stack_alignment = base::OS::ActivationFrameAlignment();
......
......@@ -1091,7 +1091,7 @@ void RegExpMacroAssemblerPPC::WriteStackPointerToRegister(int reg) {
// Private methods:
void RegExpMacroAssemblerPPC::CallCheckStackGuardState(Register scratch) {
DCHECK(!isolate()->ShouldLoadConstantsFromRootList());
DCHECK(!isolate()->IsGeneratingEmbeddedBuiltins());
DCHECK(!masm_->options().isolate_independent_code);
int frame_alignment = masm_->ActivationFrameAlignment();
......
......@@ -1070,7 +1070,7 @@ void RegExpMacroAssemblerS390::WriteStackPointerToRegister(int reg) {
// Private methods:
void RegExpMacroAssemblerS390::CallCheckStackGuardState(Register scratch) {
DCHECK(!isolate()->ShouldLoadConstantsFromRootList());
DCHECK(!isolate()->IsGeneratingEmbeddedBuiltins());
DCHECK(!masm_->options().isolate_independent_code);
static constexpr int num_arguments = 3;
......
......@@ -47,7 +47,7 @@ void TurboAssemblerBase::IndirectLoadConstant(Register destination,
LoadRootRelative(destination,
RootRegisterOffsetForBuiltinIndex(maybe_builtin_index_));
} else {
CHECK(isolate()->ShouldLoadConstantsFromRootList());
CHECK(isolate()->IsGeneratingEmbeddedBuiltins());
// Ensure the given object is in the builtins constants table and fetch its
// index.
BuiltinsConstantsTableBuilder* builder =
......
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