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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 info()->MarkAsBailoutOnUninitialized(); | 497 info()->MarkAsBailoutOnUninitialized(); |
498 } | 498 } |
499 if (FLAG_native_context_specialization) { | 499 if (FLAG_native_context_specialization) { |
500 info()->MarkAsNativeContextSpecializing(); | 500 info()->MarkAsNativeContextSpecializing(); |
501 } | 501 } |
502 } | 502 } |
503 if (!info()->shared_info()->asm_function() || FLAG_turbo_asm_deoptimization) { | 503 if (!info()->shared_info()->asm_function() || FLAG_turbo_asm_deoptimization) { |
504 info()->MarkAsDeoptimizationEnabled(); | 504 info()->MarkAsDeoptimizationEnabled(); |
505 } | 505 } |
506 | 506 |
| 507 if (!info()->shared_info()->HasBytecodeArray()) { |
| 508 if (!Compiler::EnsureDeoptimizationSupport(info())) return FAILED; |
| 509 } |
| 510 |
507 Pipeline pipeline(info()); | 511 Pipeline pipeline(info()); |
508 pipeline.GenerateCode(); | 512 pipeline.GenerateCode(); |
509 if (isolate()->has_pending_exception()) return FAILED; // Stack overflowed. | 513 if (isolate()->has_pending_exception()) return FAILED; // Stack overflowed. |
510 if (info()->code().is_null()) return AbortOptimization(kGraphBuildingFailed); | 514 if (info()->code().is_null()) return AbortOptimization(kGraphBuildingFailed); |
511 | 515 |
512 return SUCCEEDED; | 516 return SUCCEEDED; |
513 } | 517 } |
514 | 518 |
515 PipelineCompilationJob::Status PipelineCompilationJob::OptimizeGraphImpl() { | 519 PipelineCompilationJob::Status PipelineCompilationJob::OptimizeGraphImpl() { |
516 // TODO(turbofan): Currently everything is done in the first phase. | 520 // TODO(turbofan): Currently everything is done in the first phase. |
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 } | 1564 } |
1561 | 1565 |
1562 data->DeleteRegisterAllocationZone(); | 1566 data->DeleteRegisterAllocationZone(); |
1563 } | 1567 } |
1564 | 1568 |
1565 Isolate* Pipeline::isolate() const { return info()->isolate(); } | 1569 Isolate* Pipeline::isolate() const { return info()->isolate(); } |
1566 | 1570 |
1567 } // namespace compiler | 1571 } // namespace compiler |
1568 } // namespace internal | 1572 } // namespace internal |
1569 } // namespace v8 | 1573 } // namespace v8 |
OLD | NEW |