Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index 330b0960ec20ec6563867a66d8a5db069cc67fcb..2de587e820ee3cd39cdec13604cc5883132cc837 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -545,13 +545,13 @@ |
class PipelineCompilationJob final : public CompilationJob { |
public: |
- PipelineCompilationJob(ParseInfo* parse_info, Handle<JSFunction> function) |
+ PipelineCompilationJob(Isolate* isolate, Handle<JSFunction> function) |
// Note that the CompilationInfo is not initialized at the time we pass it |
// to the CompilationJob constructor, but it is not dereferenced there. |
- : CompilationJob(parse_info->isolate(), &info_, "TurboFan"), |
- parse_info_(parse_info), |
- zone_stats_(parse_info->isolate()->allocator()), |
- info_(parse_info_.get()->zone(), parse_info_.get(), function), |
+ : CompilationJob(isolate, &info_, "TurboFan"), |
+ parse_info_(handle(function->shared())), |
+ zone_stats_(isolate->allocator()), |
+ info_(parse_info_.zone(), &parse_info_, function), |
pipeline_statistics_(CreatePipelineStatistics(info(), &zone_stats_)), |
data_(&zone_stats_, info(), pipeline_statistics_.get()), |
pipeline_(&data_), |
@@ -563,7 +563,7 @@ |
Status FinalizeJobImpl() final; |
private: |
- std::unique_ptr<ParseInfo> parse_info_; |
+ ParseInfo parse_info_; |
ZoneStats zone_stats_; |
CompilationInfo info_; |
std::unique_ptr<PipelineStatistics> pipeline_statistics_; |
@@ -1750,16 +1750,8 @@ |
} |
// static |
-CompilationJob* Pipeline::NewCompilationJob(Handle<JSFunction> function, |
- bool has_script) { |
- Handle<SharedFunctionInfo> shared = handle(function->shared()); |
- ParseInfo* parse_info; |
- if (!has_script) { |
- parse_info = ParseInfo::AllocateWithoutScript(shared); |
- } else { |
- parse_info = new ParseInfo(shared); |
- } |
- return new PipelineCompilationJob(parse_info, function); |
+CompilationJob* Pipeline::NewCompilationJob(Handle<JSFunction> function) { |
+ return new PipelineCompilationJob(function->GetIsolate(), function); |
} |
// static |