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

Unified Diff: src/compiler.cc

Issue 890543002: [turbofan] Fix OSR compilations of for-in. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/compiler/ast-graph-builder.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 f7d3676e749abf8b3ac838f0994415095a1549ef..01dffc79a744d29a5798e25de8d3a08a214efd6f 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -23,6 +23,7 @@
#include "src/liveedit.h"
#include "src/messages.h"
#include "src/parser.h"
+#include "src/prettyprinter.h"
#include "src/rewriter.h"
#include "src/runtime-profiler.h"
#include "src/scanner-character-streams.h"
@@ -412,7 +413,9 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
if (FLAG_trace_opt) {
OFStream os(stdout);
os << "[compiling method " << Brief(*info()->closure())
- << " using TurboFan]" << std::endl;
+ << " using TurboFan";
+ if (info()->is_osr()) os << " OSR";
+ os << "]" << std::endl;
}
Timer t(this, &time_taken_to_create_graph_);
compiler::Pipeline pipeline(info());
@@ -425,7 +428,9 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
if (FLAG_trace_opt) {
OFStream os(stdout);
os << "[compiling method " << Brief(*info()->closure())
- << " using Crankshaft]" << std::endl;
+ << " using Crankshaft";
+ if (info()->is_osr()) os << " OSR";
+ os << "]" << std::endl;
}
if (FLAG_trace_hydrogen) {
@@ -1587,4 +1592,11 @@ bool CompilationPhase::ShouldProduceTraceOutput() const {
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(), zone()).PrintProgram(function()));
+}
+#endif
} } // namespace v8::internal
« no previous file with comments | « src/compiler.h ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698