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

Unified Diff: src/compiler.cc

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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler.h ('k') | src/crankshaft/compilation-phase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 538afacc574ce71dc257d8407402de19f42a5854..7b0faf0b92d3155dbbb7e649d6c1566f65cc5738 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1857,41 +1857,12 @@ MaybeHandle<Code> Compiler::GetConcurrentlyOptimizedCode(
}
-CompilationPhase::CompilationPhase(const char* name, CompilationInfo* info)
- : name_(name), info_(info) {
- if (FLAG_hydrogen_stats) {
- info_zone_start_allocation_size_ = info->zone()->allocation_size();
- timer_.Start();
- }
-}
-
-
-CompilationPhase::~CompilationPhase() {
- if (FLAG_hydrogen_stats) {
- size_t size = zone()->allocation_size();
- size += info_->zone()->allocation_size() - info_zone_start_allocation_size_;
- isolate()->GetHStatistics()->SaveTiming(name_, timer_.Elapsed(), size);
- }
-}
-
-
-bool CompilationPhase::ShouldProduceTraceOutput() const {
- // Trace if the appropriate trace flag is set and the phase name's first
- // character is in the FLAG_trace_phase command line parameter.
- AllowHandleDereference allow_deref;
- bool tracing_on = info()->IsStub()
- ? FLAG_trace_hydrogen_stubs
- : (FLAG_trace_hydrogen &&
- info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
- return (tracing_on &&
- base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
-}
-
#if DEBUG
void CompilationInfo::PrintAstForTesting() {
PrintF("--- Source from AST ---\n%s\n",
PrettyPrinter(isolate()).PrintProgram(literal()));
}
#endif
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler.h ('k') | src/crankshaft/compilation-phase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698