| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 Zone* zone() { return zone_scope_.zone(); } | 473 Zone* zone() { return zone_scope_.zone(); } |
| 474 | 474 |
| 475 private: | 475 private: |
| 476 PhaseScope phase_scope_; | 476 PhaseScope phase_scope_; |
| 477 ZonePool::Scope zone_scope_; | 477 ZonePool::Scope zone_scope_; |
| 478 }; | 478 }; |
| 479 | 479 |
| 480 class PipelineCompilationJob : public OptimizedCompileJob { | 480 class PipelineCompilationJob : public OptimizedCompileJob { |
| 481 public: | 481 public: |
| 482 explicit PipelineCompilationJob(CompilationInfo* info) | 482 explicit PipelineCompilationJob(CompilationInfo* info) |
| 483 : OptimizedCompileJob(info) {} | 483 : OptimizedCompileJob(info, "TurboFan") {} |
| 484 | 484 |
| 485 protected: | 485 protected: |
| 486 virtual Status CreateGraphImpl(); | 486 virtual Status CreateGraphImpl(); |
| 487 virtual Status OptimizeGraphImpl(); | 487 virtual Status OptimizeGraphImpl(); |
| 488 virtual Status GenerateCodeImpl(); | 488 virtual Status GenerateCodeImpl(); |
| 489 }; | 489 }; |
| 490 | 490 |
| 491 PipelineCompilationJob::Status PipelineCompilationJob::CreateGraphImpl() { | 491 PipelineCompilationJob::Status PipelineCompilationJob::CreateGraphImpl() { |
| 492 if (FLAG_trace_opt) { | |
| 493 OFStream os(stdout); | |
| 494 os << "[compiling method " << Brief(*info()->closure()) | |
| 495 << " using TurboFan"; | |
| 496 if (info()->is_osr()) os << " OSR"; | |
| 497 os << "]" << std::endl; | |
| 498 } | |
| 499 | |
| 500 if (info()->shared_info()->asm_function()) { | 492 if (info()->shared_info()->asm_function()) { |
| 501 if (info()->osr_frame()) info()->MarkAsFrameSpecializing(); | 493 if (info()->osr_frame()) info()->MarkAsFrameSpecializing(); |
| 502 info()->MarkAsFunctionContextSpecializing(); | 494 info()->MarkAsFunctionContextSpecializing(); |
| 503 } else { | 495 } else { |
| 504 if (!FLAG_always_opt) { | 496 if (!FLAG_always_opt) { |
| 505 info()->MarkAsBailoutOnUninitialized(); | 497 info()->MarkAsBailoutOnUninitialized(); |
| 506 } | 498 } |
| 507 if (FLAG_native_context_specialization) { | 499 if (FLAG_native_context_specialization) { |
| 508 info()->MarkAsNativeContextSpecializing(); | 500 info()->MarkAsNativeContextSpecializing(); |
| 509 info()->MarkAsTypingEnabled(); | 501 info()->MarkAsTypingEnabled(); |
| (...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1586 } | 1578 } |
| 1587 | 1579 |
| 1588 data->DeleteRegisterAllocationZone(); | 1580 data->DeleteRegisterAllocationZone(); |
| 1589 } | 1581 } |
| 1590 | 1582 |
| 1591 Isolate* Pipeline::isolate() const { return info()->isolate(); } | 1583 Isolate* Pipeline::isolate() const { return info()->isolate(); } |
| 1592 | 1584 |
| 1593 } // namespace compiler | 1585 } // namespace compiler |
| 1594 } // namespace internal | 1586 } // namespace internal |
| 1595 } // namespace v8 | 1587 } // namespace v8 |
| OLD | NEW |