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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 if (!info()->shared_info()->asm_function() || FLAG_turbo_asm_deoptimization) { | 600 if (!info()->shared_info()->asm_function() || FLAG_turbo_asm_deoptimization) { |
601 info()->MarkAsDeoptimizationEnabled(); | 601 info()->MarkAsDeoptimizationEnabled(); |
602 } | 602 } |
603 if (!info()->is_optimizing_from_bytecode()) { | 603 if (!info()->is_optimizing_from_bytecode()) { |
604 if (info()->is_deoptimization_enabled() && FLAG_turbo_type_feedback) { | 604 if (info()->is_deoptimization_enabled() && FLAG_turbo_type_feedback) { |
605 info()->MarkAsTypeFeedbackEnabled(); | 605 info()->MarkAsTypeFeedbackEnabled(); |
606 } | 606 } |
607 if (!Compiler::EnsureDeoptimizationSupport(info())) return FAILED; | 607 if (!Compiler::EnsureDeoptimizationSupport(info())) return FAILED; |
608 } | 608 } |
609 | 609 |
| 610 // TODO(mstarzinger): Hack to ensure that the ToNumber call descriptor is |
| 611 // initialized on the main thread, since it is needed off-thread by the |
| 612 // effect control linearizer. |
| 613 CodeFactory::ToNumber(info()->isolate()); |
| 614 |
610 linkage_ = new (&zone_) Linkage(Linkage::ComputeIncoming(&zone_, info())); | 615 linkage_ = new (&zone_) Linkage(Linkage::ComputeIncoming(&zone_, info())); |
611 | 616 |
612 if (!pipeline_.CreateGraph()) { | 617 if (!pipeline_.CreateGraph()) { |
613 if (isolate()->has_pending_exception()) return FAILED; // Stack overflowed. | 618 if (isolate()->has_pending_exception()) return FAILED; // Stack overflowed. |
614 return AbortOptimization(kGraphBuildingFailed); | 619 return AbortOptimization(kGraphBuildingFailed); |
615 } | 620 } |
616 | 621 |
617 return SUCCEEDED; | 622 return SUCCEEDED; |
618 } | 623 } |
619 | 624 |
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1860 data->DeleteRegisterAllocationZone(); | 1865 data->DeleteRegisterAllocationZone(); |
1861 } | 1866 } |
1862 | 1867 |
1863 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1868 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
1864 | 1869 |
1865 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 1870 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
1866 | 1871 |
1867 } // namespace compiler | 1872 } // namespace compiler |
1868 } // namespace internal | 1873 } // namespace internal |
1869 } // namespace v8 | 1874 } // namespace v8 |
OLD | NEW |