| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_COMPILER_H_ | 5 #ifndef V8_COMPILER_H_ |
| 6 #define V8_COMPILER_H_ | 6 #define V8_COMPILER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 Handle<Code> current_code, | 722 Handle<Code> current_code, |
| 723 ConcurrencyMode mode, | 723 ConcurrencyMode mode, |
| 724 BailoutId osr_ast_id = BailoutId::None()); | 724 BailoutId osr_ast_id = BailoutId::None()); |
| 725 | 725 |
| 726 // Generate and return code from previously queued optimization job. | 726 // Generate and return code from previously queued optimization job. |
| 727 // On failure, return the empty handle. | 727 // On failure, return the empty handle. |
| 728 static Handle<Code> GetConcurrentlyOptimizedCode(OptimizedCompileJob* job); | 728 static Handle<Code> GetConcurrentlyOptimizedCode(OptimizedCompileJob* job); |
| 729 | 729 |
| 730 static bool DebuggerWantsEagerCompilation( | 730 static bool DebuggerWantsEagerCompilation( |
| 731 CompilationInfo* info, bool allow_lazy_without_ctx = false); | 731 CompilationInfo* info, bool allow_lazy_without_ctx = false); |
| 732 |
| 733 static bool IsCodeCachingActive(Isolate* isolate); |
| 732 }; | 734 }; |
| 733 | 735 |
| 734 | 736 |
| 735 class CompilationPhase BASE_EMBEDDED { | 737 class CompilationPhase BASE_EMBEDDED { |
| 736 public: | 738 public: |
| 737 CompilationPhase(const char* name, CompilationInfo* info); | 739 CompilationPhase(const char* name, CompilationInfo* info); |
| 738 ~CompilationPhase(); | 740 ~CompilationPhase(); |
| 739 | 741 |
| 740 protected: | 742 protected: |
| 741 bool ShouldProduceTraceOutput() const; | 743 bool ShouldProduceTraceOutput() const; |
| 742 | 744 |
| 743 const char* name() const { return name_; } | 745 const char* name() const { return name_; } |
| 744 CompilationInfo* info() const { return info_; } | 746 CompilationInfo* info() const { return info_; } |
| 745 Isolate* isolate() const { return info()->isolate(); } | 747 Isolate* isolate() const { return info()->isolate(); } |
| 746 Zone* zone() { return &zone_; } | 748 Zone* zone() { return &zone_; } |
| 747 | 749 |
| 748 private: | 750 private: |
| 749 const char* name_; | 751 const char* name_; |
| 750 CompilationInfo* info_; | 752 CompilationInfo* info_; |
| 751 Zone zone_; | 753 Zone zone_; |
| 752 unsigned info_zone_start_allocation_size_; | 754 unsigned info_zone_start_allocation_size_; |
| 753 base::ElapsedTimer timer_; | 755 base::ElapsedTimer timer_; |
| 754 | 756 |
| 755 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 757 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
| 756 }; | 758 }; |
| 757 | 759 |
| 758 } } // namespace v8::internal | 760 } } // namespace v8::internal |
| 759 | 761 |
| 760 #endif // V8_COMPILER_H_ | 762 #endif // V8_COMPILER_H_ |
| OLD | NEW |