Chromium Code Reviews| Index: src/compiler/pipeline.cc |
| diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
| index 3ea6c2ba812ef824b2ddadd4ee03040b062c3c94..289758d64dc96eb4816ba686ae460a526b774714 100644 |
| --- a/src/compiler/pipeline.cc |
| +++ b/src/compiler/pipeline.cc |
| @@ -65,6 +65,7 @@ |
| #include "src/compiler/zone-pool.h" |
| #include "src/isolate-inl.h" |
| #include "src/ostreams.h" |
| +#include "src/parsing/parser.h" |
| #include "src/register-configuration.h" |
| #include "src/type-info.h" |
| #include "src/utils.h" |
| @@ -502,13 +503,16 @@ PipelineStatistics* CreatePipelineStatistics(CompilationInfo* info, |
| class PipelineCompilationJob final : public CompilationJob { |
| public: |
| - explicit PipelineCompilationJob(CompilationInfo* info) |
| - : CompilationJob(info, "TurboFan"), |
| - zone_pool_(info->isolate()->allocator()), |
| - pipeline_statistics_(CreatePipelineStatistics(info, &zone_pool_)), |
| - data_(&zone_pool_, info, pipeline_statistics_.get()), |
| + PipelineCompilationJob(Isolate* isolate, Handle<JSFunction> function) |
| + : CompilationJob(&info_, "TurboFan"), |
|
Benedikt Meurer
2016/04/28 10:23:02
Hm, info_ is uninitialized memory at this point. A
Michael Starzinger
2016/05/02 12:35:05
Done.
|
| + zone_(isolate->allocator()), |
| + zone_pool_(isolate->allocator()), |
| + parse_info_(&zone_, function), |
| + info_(&parse_info_, function), |
| + pipeline_statistics_(CreatePipelineStatistics(info(), &zone_pool_)), |
| + data_(&zone_pool_, info(), pipeline_statistics_.get()), |
| pipeline_(&data_), |
| - linkage_(Linkage::ComputeIncoming(info->zone(), info)) {} |
| + linkage_(Linkage::ComputeIncoming(info()->zone(), info())) {} |
| protected: |
| Status CreateGraphImpl() final; |
| @@ -516,7 +520,10 @@ class PipelineCompilationJob final : public CompilationJob { |
| Status GenerateCodeImpl() final; |
| private: |
| + Zone zone_; |
| ZonePool zone_pool_; |
| + ParseInfo parse_info_; |
| + CompilationInfo info_; |
| base::SmartPointer<PipelineStatistics> pipeline_statistics_; |
| PipelineData data_; |
| Pipeline pipeline_; |
| @@ -1461,8 +1468,8 @@ Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info, |
| } |
| // static |
| -CompilationJob* Pipeline::NewCompilationJob(CompilationInfo* info) { |
| - return new PipelineCompilationJob(info); |
| +CompilationJob* Pipeline::NewCompilationJob(Handle<JSFunction> function) { |
| + return new PipelineCompilationJob(function->GetIsolate(), function); |
| } |
| // static |