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

Unified Diff: src/log.cc

Issue 1148043002: Remove obsolete Code::optimizable flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/full-codegen.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index de99a774cbf71ad1347f44d0bcf5eea96507f695..241b446ebdb02fad626861229af186a5ee62aec2 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -48,12 +48,14 @@ for (int i = 0; i < listeners_.length(); ++i) { \
} \
} while (false);
-// ComputeMarker must only be used when SharedFunctionInfo is known.
-static const char* ComputeMarker(Code* code) {
+static const char* ComputeMarker(SharedFunctionInfo* shared, Code* code) {
switch (code->kind()) {
- case Code::FUNCTION: return code->optimizable() ? "~" : "";
- case Code::OPTIMIZED_FUNCTION: return "*";
- default: return "";
+ case Code::FUNCTION:
+ return shared->optimization_disabled() ? "" : "~";
+ case Code::OPTIMIZED_FUNCTION:
+ return "*";
+ default:
+ return "";
}
}
@@ -183,7 +185,7 @@ void CodeEventLogger::CodeCreateEvent(Logger::LogEventsAndTags tag,
CompilationInfo* info,
Name* name) {
name_buffer_->Init(tag);
- name_buffer_->AppendBytes(ComputeMarker(code));
+ name_buffer_->AppendBytes(ComputeMarker(shared, code));
name_buffer_->AppendName(name);
LogRecordedBuffer(code, shared, name_buffer_->get(), name_buffer_->size());
}
@@ -195,7 +197,7 @@ void CodeEventLogger::CodeCreateEvent(Logger::LogEventsAndTags tag,
CompilationInfo* info,
Name* source, int line, int column) {
name_buffer_->Init(tag);
- name_buffer_->AppendBytes(ComputeMarker(code));
+ name_buffer_->AppendBytes(ComputeMarker(shared, code));
name_buffer_->AppendString(shared->DebugName());
name_buffer_->AppendByte(' ');
if (source->IsString()) {
@@ -1199,7 +1201,7 @@ void Logger::CodeCreateEvent(LogEventsAndTags tag,
}
msg.Append(',');
msg.AppendAddress(shared->address());
- msg.Append(",%s", ComputeMarker(code));
+ msg.Append(",%s", ComputeMarker(shared, code));
msg.WriteToLogFile();
}
@@ -1233,7 +1235,7 @@ void Logger::CodeCreateEvent(LogEventsAndTags tag,
}
msg.Append(":%d:%d\",", line, column);
msg.AppendAddress(shared->address());
- msg.Append(",%s", ComputeMarker(code));
+ msg.Append(",%s", ComputeMarker(shared, code));
msg.WriteToLogFile();
}
« no previous file with comments | « src/full-codegen.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698