Commit b2425ff8 authored by Jakob Gruber's avatar Jakob Gruber Committed by V8 LUCI CQ

[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: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79439}
parent d876064c
...@@ -1105,15 +1105,14 @@ PipelineCompilationJob::PipelineCompilationJob( ...@@ -1105,15 +1105,14 @@ PipelineCompilationJob::PipelineCompilationJob(
// we pass it to the CompilationJob constructor, but it is not // we pass it to the CompilationJob constructor, but it is not
// dereferenced there. // dereferenced there.
: OptimizedCompilationJob(&compilation_info_, "TurboFan"), : OptimizedCompilationJob(&compilation_info_, "TurboFan"),
zone_(function->GetIsolate()->allocator(), zone_(isolate->allocator(), kPipelineCompilationJobZoneName),
kPipelineCompilationJobZoneName), zone_stats_(isolate->allocator()),
zone_stats_(function->GetIsolate()->allocator()), compilation_info_(&zone_, isolate, shared_info, function, code_kind,
compilation_info_(&zone_, function->GetIsolate(), shared_info, function, osr_offset, osr_frame),
code_kind, osr_offset, osr_frame),
pipeline_statistics_(CreatePipelineStatistics( pipeline_statistics_(CreatePipelineStatistics(
handle(Script::cast(shared_info->script()), isolate), handle(Script::cast(shared_info->script()), isolate),
compilation_info(), function->GetIsolate(), &zone_stats_)), compilation_info(), isolate, &zone_stats_)),
data_(&zone_stats_, function->GetIsolate(), compilation_info(), data_(&zone_stats_, isolate, compilation_info(),
pipeline_statistics_.get()), pipeline_statistics_.get()),
pipeline_(&data_), pipeline_(&data_),
linkage_(nullptr) {} linkage_(nullptr) {}
...@@ -3310,8 +3309,7 @@ MaybeHandle<Code> Pipeline::GenerateCodeForTesting( ...@@ -3310,8 +3309,7 @@ MaybeHandle<Code> Pipeline::GenerateCodeForTesting(
std::unique_ptr<OptimizedCompilationJob> Pipeline::NewCompilationJob( std::unique_ptr<OptimizedCompilationJob> Pipeline::NewCompilationJob(
Isolate* isolate, Handle<JSFunction> function, CodeKind code_kind, Isolate* isolate, Handle<JSFunction> function, CodeKind code_kind,
bool has_script, BytecodeOffset osr_offset, JavaScriptFrame* osr_frame) { bool has_script, BytecodeOffset osr_offset, JavaScriptFrame* osr_frame) {
Handle<SharedFunctionInfo> shared = Handle<SharedFunctionInfo> shared(function->shared(), isolate);
handle(function->shared(), function->GetIsolate());
return std::make_unique<PipelineCompilationJob>( return std::make_unique<PipelineCompilationJob>(
isolate, shared, function, osr_offset, osr_frame, code_kind); isolate, shared, function, osr_offset, osr_frame, code_kind);
} }
......
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