[compiler] Replace unneeded GetIsolate calls

When the Isolate is already available, there is no need to fetch it
through GetIsolate.

Change-Id: I3ddc3d46924b401f154360564b203406a9b9e8e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3510389
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79439}
This commit is contained in:
Jakob Gruber 2022-03-09 08:13:42 +01:00 committed by V8 LUCI CQ
parent d876064c79
commit b2425ff8ad

View File

@ -1105,15 +1105,14 @@ PipelineCompilationJob::PipelineCompilationJob(
// we pass it to the CompilationJob constructor, but it is not
// dereferenced there.
: OptimizedCompilationJob(&compilation_info_, "TurboFan"),
zone_(function->GetIsolate()->allocator(),
kPipelineCompilationJobZoneName),
zone_stats_(function->GetIsolate()->allocator()),
compilation_info_(&zone_, function->GetIsolate(), shared_info, function,
code_kind, osr_offset, osr_frame),
zone_(isolate->allocator(), kPipelineCompilationJobZoneName),
zone_stats_(isolate->allocator()),
compilation_info_(&zone_, isolate, shared_info, function, code_kind,
osr_offset, osr_frame),
pipeline_statistics_(CreatePipelineStatistics(
handle(Script::cast(shared_info->script()), isolate),
compilation_info(), function->GetIsolate(), &zone_stats_)),
data_(&zone_stats_, function->GetIsolate(), compilation_info(),
compilation_info(), isolate, &zone_stats_)),
data_(&zone_stats_, isolate, compilation_info(),
pipeline_statistics_.get()),
pipeline_(&data_),
linkage_(nullptr) {}
@ -3310,8 +3309,7 @@ MaybeHandle<Code> Pipeline::GenerateCodeForTesting(
std::unique_ptr<OptimizedCompilationJob> Pipeline::NewCompilationJob(
Isolate* isolate, Handle<JSFunction> function, CodeKind code_kind,
bool has_script, BytecodeOffset osr_offset, JavaScriptFrame* osr_frame) {
Handle<SharedFunctionInfo> shared =
handle(function->shared(), function->GetIsolate());
Handle<SharedFunctionInfo> shared(function->shared(), isolate);
return std::make_unique<PipelineCompilationJob>(
isolate, shared, function, osr_offset, osr_frame, code_kind);
}