Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: src/compiler.h

Issue 1758773002: [crankshaft] Move CompilationPhase into separate file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-api-2
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | src/compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698