Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: src/compiler/pipeline.cc

Issue 1930773003: [compiler] Untangle CompilationInfo allocated with new. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-simplify-30
Patch Set: Fix finalization. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« src/compiler.h ('K') | « src/compiler/pipeline.h ('k') | src/crankshaft/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698