| 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/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 Handle<JSFunction> function, ConcurrencyMode mode, | 657 Handle<JSFunction> function, ConcurrencyMode mode, |
| 658 BailoutId osr_ast_id = BailoutId::None(), | 658 BailoutId osr_ast_id = BailoutId::None(), |
| 659 JavaScriptFrame* osr_frame = nullptr); | 659 JavaScriptFrame* osr_frame = nullptr); |
| 660 | 660 |
| 661 // Generate and return code from previously queued optimization job. | 661 // Generate and return code from previously queued optimization job. |
| 662 // On failure, return the empty handle. | 662 // On failure, return the empty handle. |
| 663 MUST_USE_RESULT static MaybeHandle<Code> GetConcurrentlyOptimizedCode( | 663 MUST_USE_RESULT static MaybeHandle<Code> GetConcurrentlyOptimizedCode( |
| 664 OptimizedCompileJob* job); | 664 OptimizedCompileJob* job); |
| 665 }; | 665 }; |
| 666 | 666 |
| 667 | |
| 668 class CompilationPhase BASE_EMBEDDED { | |
| 669 public: | |
| 670 CompilationPhase(const char* name, CompilationInfo* info); | |
| 671 ~CompilationPhase(); | |
| 672 | |
| 673 protected: | |
| 674 bool ShouldProduceTraceOutput() const; | |
| 675 | |
| 676 const char* name() const { return name_; } | |
| 677 CompilationInfo* info() const { return info_; } | |
| 678 Isolate* isolate() const { return info()->isolate(); } | |
| 679 Zone* zone() { return &zone_; } | |
| 680 | |
| 681 private: | |
| 682 const char* name_; | |
| 683 CompilationInfo* info_; | |
| 684 Zone zone_; | |
| 685 size_t info_zone_start_allocation_size_; | |
| 686 base::ElapsedTimer timer_; | |
| 687 | |
| 688 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | |
| 689 }; | |
| 690 | |
| 691 } // namespace internal | 667 } // namespace internal |
| 692 } // namespace v8 | 668 } // namespace v8 |
| 693 | 669 |
| 694 #endif // V8_COMPILER_H_ | 670 #endif // V8_COMPILER_H_ |
| OLD | NEW |