OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <memory> | 8 #include <memory> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 | 544 |
545 } // namespace | 545 } // namespace |
546 | 546 |
547 class PipelineCompilationJob final : public CompilationJob { | 547 class PipelineCompilationJob final : public CompilationJob { |
548 public: | 548 public: |
549 PipelineCompilationJob(Isolate* isolate, Handle<JSFunction> function) | 549 PipelineCompilationJob(Isolate* isolate, Handle<JSFunction> function) |
550 // Note that the CompilationInfo is not initialized at the time we pass it | 550 // Note that the CompilationInfo is not initialized at the time we pass it |
551 // to the CompilationJob constructor, but it is not dereferenced there. | 551 // to the CompilationJob constructor, but it is not dereferenced there. |
552 : CompilationJob(isolate, &info_, "TurboFan"), | 552 : CompilationJob(isolate, &info_, "TurboFan"), |
553 parse_info_(handle(function->shared())), | 553 parse_info_(handle(function->shared())), |
| 554 compile_zone_(isolate->allocator(), ZONE_NAME), |
554 zone_stats_(isolate->allocator()), | 555 zone_stats_(isolate->allocator()), |
555 info_(&parse_info_, function), | 556 info_(&compile_zone_, &parse_info_, function), |
556 pipeline_statistics_(CreatePipelineStatistics(info(), &zone_stats_)), | 557 pipeline_statistics_(CreatePipelineStatistics(info(), &zone_stats_)), |
557 data_(&zone_stats_, info(), pipeline_statistics_.get()), | 558 data_(&zone_stats_, info(), pipeline_statistics_.get()), |
558 pipeline_(&data_), | 559 pipeline_(&data_), |
559 linkage_(nullptr) {} | 560 linkage_(nullptr) {} |
560 | 561 |
561 protected: | 562 protected: |
562 Status PrepareJobImpl() final; | 563 Status PrepareJobImpl() final; |
563 Status ExecuteJobImpl() final; | 564 Status ExecuteJobImpl() final; |
564 Status FinalizeJobImpl() final; | 565 Status FinalizeJobImpl() final; |
565 | 566 |
566 private: | 567 private: |
567 ParseInfo parse_info_; | 568 ParseInfo parse_info_; |
| 569 Zone compile_zone_; |
568 ZoneStats zone_stats_; | 570 ZoneStats zone_stats_; |
569 CompilationInfo info_; | 571 CompilationInfo info_; |
570 std::unique_ptr<PipelineStatistics> pipeline_statistics_; | 572 std::unique_ptr<PipelineStatistics> pipeline_statistics_; |
571 PipelineData data_; | 573 PipelineData data_; |
572 PipelineImpl pipeline_; | 574 PipelineImpl pipeline_; |
573 Linkage* linkage_; | 575 Linkage* linkage_; |
574 | 576 |
575 DISALLOW_COPY_AND_ASSIGN(PipelineCompilationJob); | 577 DISALLOW_COPY_AND_ASSIGN(PipelineCompilationJob); |
576 }; | 578 }; |
577 | 579 |
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2013 data->DeleteRegisterAllocationZone(); | 2015 data->DeleteRegisterAllocationZone(); |
2014 } | 2016 } |
2015 | 2017 |
2016 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 2018 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
2017 | 2019 |
2018 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 2020 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
2019 | 2021 |
2020 } // namespace compiler | 2022 } // namespace compiler |
2021 } // namespace internal | 2023 } // namespace internal |
2022 } // namespace v8 | 2024 } // namespace v8 |
OLD | NEW |