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 <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/base/adapters.h" | 10 #include "src/base/adapters.h" |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 if (!pipeline_.OptimizeGraph(&linkage_)) return FAILED; | 554 if (!pipeline_.OptimizeGraph(&linkage_)) return FAILED; |
555 return SUCCEEDED; | 555 return SUCCEEDED; |
556 } | 556 } |
557 | 557 |
558 PipelineCompilationJob::Status PipelineCompilationJob::GenerateCodeImpl() { | 558 PipelineCompilationJob::Status PipelineCompilationJob::GenerateCodeImpl() { |
559 Handle<Code> code = pipeline_.GenerateCode(&linkage_); | 559 Handle<Code> code = pipeline_.GenerateCode(&linkage_); |
560 if (code.is_null()) { | 560 if (code.is_null()) { |
561 if (info()->bailout_reason() == kNoReason) { | 561 if (info()->bailout_reason() == kNoReason) { |
562 return AbortOptimization(kCodeGenerationFailed); | 562 return AbortOptimization(kCodeGenerationFailed); |
563 } | 563 } |
564 return BAILED_OUT; | 564 return FAILED; |
565 } | 565 } |
566 info()->dependencies()->Commit(code); | 566 info()->dependencies()->Commit(code); |
567 info()->SetCode(code); | 567 info()->SetCode(code); |
568 if (info()->is_deoptimization_enabled()) { | 568 if (info()->is_deoptimization_enabled()) { |
569 info()->context()->native_context()->AddOptimizedCode(*code); | 569 info()->context()->native_context()->AddOptimizedCode(*code); |
570 RegisterWeakObjectsInOptimizedCode(code); | 570 RegisterWeakObjectsInOptimizedCode(code); |
571 } | 571 } |
572 return SUCCEEDED; | 572 return SUCCEEDED; |
573 } | 573 } |
574 | 574 |
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1698 data->DeleteRegisterAllocationZone(); | 1698 data->DeleteRegisterAllocationZone(); |
1699 } | 1699 } |
1700 | 1700 |
1701 CompilationInfo* Pipeline::info() const { return data_->info(); } | 1701 CompilationInfo* Pipeline::info() const { return data_->info(); } |
1702 | 1702 |
1703 Isolate* Pipeline::isolate() const { return info()->isolate(); } | 1703 Isolate* Pipeline::isolate() const { return info()->isolate(); } |
1704 | 1704 |
1705 } // namespace compiler | 1705 } // namespace compiler |
1706 } // namespace internal | 1706 } // namespace internal |
1707 } // namespace v8 | 1707 } // namespace v8 |
OLD | NEW |