| 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 return pipeline_statistics; | 555 return pipeline_statistics; |
| 556 } | 556 } |
| 557 | 557 |
| 558 } // namespace | 558 } // namespace |
| 559 | 559 |
| 560 class PipelineCompilationJob final : public CompilationJob { | 560 class PipelineCompilationJob final : public CompilationJob { |
| 561 public: | 561 public: |
| 562 PipelineCompilationJob(Isolate* isolate, Handle<JSFunction> function) | 562 PipelineCompilationJob(Isolate* isolate, Handle<JSFunction> function) |
| 563 // Note that the CompilationInfo is not initialized at the time we pass it | 563 // Note that the CompilationInfo is not initialized at the time we pass it |
| 564 // to the CompilationJob constructor, but it is not dereferenced there. | 564 // to the CompilationJob constructor, but it is not dereferenced there. |
| 565 : CompilationJob(&info_, "TurboFan"), | 565 : CompilationJob(isolate, &info_, "TurboFan"), |
| 566 zone_(isolate->allocator()), | 566 zone_(isolate->allocator()), |
| 567 zone_pool_(isolate->allocator()), | 567 zone_pool_(isolate->allocator()), |
| 568 parse_info_(&zone_, function), | 568 parse_info_(&zone_, function), |
| 569 info_(&parse_info_, function), | 569 info_(&parse_info_, function), |
| 570 pipeline_statistics_(CreatePipelineStatistics(info(), &zone_pool_)), | 570 pipeline_statistics_(CreatePipelineStatistics(info(), &zone_pool_)), |
| 571 data_(&zone_pool_, info(), pipeline_statistics_.get()), | 571 data_(&zone_pool_, info(), pipeline_statistics_.get()), |
| 572 pipeline_(&data_), | 572 pipeline_(&data_), |
| 573 linkage_(nullptr) {} | 573 linkage_(nullptr) {} |
| 574 | 574 |
| 575 protected: | 575 protected: |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 RegisterWeakObjectsInOptimizedCode(code); | 653 RegisterWeakObjectsInOptimizedCode(code); |
| 654 } | 654 } |
| 655 return SUCCEEDED; | 655 return SUCCEEDED; |
| 656 } | 656 } |
| 657 | 657 |
| 658 class PipelineWasmCompilationJob final : public CompilationJob { | 658 class PipelineWasmCompilationJob final : public CompilationJob { |
| 659 public: | 659 public: |
| 660 explicit PipelineWasmCompilationJob(CompilationInfo* info, Graph* graph, | 660 explicit PipelineWasmCompilationJob(CompilationInfo* info, Graph* graph, |
| 661 CallDescriptor* descriptor, | 661 CallDescriptor* descriptor, |
| 662 SourcePositionTable* source_positions) | 662 SourcePositionTable* source_positions) |
| 663 : CompilationJob(info, "TurboFan", State::kReadyToExecute), | 663 : CompilationJob(info->isolate(), info, "TurboFan", |
| 664 State::kReadyToExecute), |
| 664 zone_pool_(info->isolate()->allocator()), | 665 zone_pool_(info->isolate()->allocator()), |
| 665 data_(&zone_pool_, info, graph, source_positions), | 666 data_(&zone_pool_, info, graph, source_positions), |
| 666 pipeline_(&data_), | 667 pipeline_(&data_), |
| 667 linkage_(descriptor) {} | 668 linkage_(descriptor) {} |
| 668 | 669 |
| 669 protected: | 670 protected: |
| 670 Status PrepareJobImpl() final; | 671 Status PrepareJobImpl() final; |
| 671 Status ExecuteJobImpl() final; | 672 Status ExecuteJobImpl() final; |
| 672 Status FinalizeJobImpl() final; | 673 Status FinalizeJobImpl() final; |
| 673 | 674 |
| (...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1930 data->DeleteRegisterAllocationZone(); | 1931 data->DeleteRegisterAllocationZone(); |
| 1931 } | 1932 } |
| 1932 | 1933 |
| 1933 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1934 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
| 1934 | 1935 |
| 1935 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 1936 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
| 1936 | 1937 |
| 1937 } // namespace compiler | 1938 } // namespace compiler |
| 1938 } // namespace internal | 1939 } // namespace internal |
| 1939 } // namespace v8 | 1940 } // namespace v8 |
| OLD | NEW |