Commit 8389acd7 authored by Victor Gomes's avatar Victor Gomes Committed by V8 LUCI CQ

[cleanup] Consistently name flag disabled_optimization_reason

Change-Id: I1d343244f9b4674b830c13a879d90397de4a784a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3263886
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77724}
parent 3bec8e23
......@@ -1053,7 +1053,7 @@ MaybeHandle<Code> GetOptimizedCode(
if (function->HasOptimizationMarker()) function->ClearOptimizationMarker();
if (shared->optimization_disabled() &&
shared->disable_optimization_reason() == BailoutReason::kNeverOptimize) {
shared->disabled_optimization_reason() == BailoutReason::kNeverOptimize) {
return {};
}
......
......@@ -1513,7 +1513,7 @@ void Logger::CodeDisableOptEvent(Handle<AbstractCode> code,
MSG_BUILDER();
msg << kLogEventsNames[CodeEventListener::CODE_DISABLE_OPT_EVENT] << kNext
<< shared->DebugNameCStr().get() << kNext
<< GetBailoutReason(shared->disable_optimization_reason());
<< GetBailoutReason(shared->disabled_optimization_reason());
msg.WriteToLogFile();
}
......
......@@ -310,10 +310,10 @@ BIT_FIELD_ACCESSORS(SharedFunctionInfo, relaxed_flags,
SharedFunctionInfo::PrivateNameLookupSkipsOuterClassBit)
bool SharedFunctionInfo::optimization_disabled() const {
return disable_optimization_reason() != BailoutReason::kNoReason;
return disabled_optimization_reason() != BailoutReason::kNoReason;
}
BailoutReason SharedFunctionInfo::disable_optimization_reason() const {
BailoutReason SharedFunctionInfo::disabled_optimization_reason() const {
return DisabledOptimizationReasonBits::decode(flags(kRelaxedLoad));
}
......
......@@ -485,7 +485,7 @@ class SharedFunctionInfo
inline bool optimization_disabled() const;
// The reason why optimization was disabled.
inline BailoutReason disable_optimization_reason() const;
inline BailoutReason disabled_optimization_reason() const;
// Disable (further) attempted optimization of all functions sharing this
// shared function info.
......
......@@ -208,7 +208,7 @@ void CodeEntry::FillFunctionInfo(SharedFunctionInfo shared) {
set_script_id(script.id());
set_position(shared.StartPosition());
if (shared.optimization_disabled()) {
set_bailout_reason(GetBailoutReason(shared.disable_optimization_reason()));
set_bailout_reason(GetBailoutReason(shared.disabled_optimization_reason()));
}
}
......
......@@ -315,7 +315,8 @@ void ProfilerListener::CodeDisableOptEvent(Handle<AbstractCode> code,
CodeEventsContainer evt_rec(CodeEventRecord::CODE_DISABLE_OPT);
CodeDisableOptEventRecord* rec = &evt_rec.CodeDisableOptEventRecord_;
rec->instruction_start = code->InstructionStart();
rec->bailout_reason = GetBailoutReason(shared->disable_optimization_reason());
rec->bailout_reason =
GetBailoutReason(shared->disabled_optimization_reason());
DispatchCodeEvent(evt_rec);
}
......
......@@ -250,7 +250,7 @@ bool CanOptimizeFunction(Handle<JSFunction> function, Isolate* isolate,
if (!FLAG_opt) return false;
if (function->shared().optimization_disabled() &&
function->shared().disable_optimization_reason() ==
function->shared().disabled_optimization_reason() ==
BailoutReason::kNeverOptimize) {
return CrashUnlessFuzzingReturnFalse(isolate);
}
......@@ -430,7 +430,7 @@ RUNTIME_FUNCTION(Runtime_PrepareFunctionForOptimization) {
// If optimization is disabled for the function, return without making it
// pending optimize for test.
if (function->shared().optimization_disabled() &&
function->shared().disable_optimization_reason() ==
function->shared().disabled_optimization_reason() ==
BailoutReason::kNeverOptimize) {
return CrashUnlessFuzzing(isolate);
}
......@@ -499,7 +499,7 @@ RUNTIME_FUNCTION(Runtime_OptimizeOsr) {
}
if (function->shared().optimization_disabled() &&
function->shared().disable_optimization_reason() ==
function->shared().disabled_optimization_reason() ==
BailoutReason::kNeverOptimize) {
return CrashUnlessFuzzing(isolate);
}
......
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