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

Unified Diff: src/objects.cc

Issue 11640041: Refactoring only: Extracted method to print deopt location. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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/objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 5f87a26065df2a176884b269a0fe99f0ffb2c064..e43a94ab49978c2db77abe22bee7dd2df65af242 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9138,6 +9138,25 @@ Code* Code::GetCodeAgeStub(Age age, MarkingParity parity) {
}
+void Code::PrintDeoptLocation(int bailout_id) {
+ const char* last_comment = NULL;
+ int mask = RelocInfo::ModeMask(RelocInfo::COMMENT)
+ | RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY);
+ for (RelocIterator it(this, mask); !it.done(); it.next()) {
+ RelocInfo* info = it.rinfo();
+ if (info->rmode() == RelocInfo::COMMENT) {
+ last_comment = reinterpret_cast<const char*>(info->data());
+ } else if (last_comment != NULL &&
+ bailout_id == Deoptimizer::GetDeoptimizationId(
+ info->target_address(), Deoptimizer::EAGER)) {
+ CHECK(info->rmode() == RelocInfo::RUNTIME_ENTRY);
+ PrintF(" %s\n", last_comment);
+ return;
+ }
+ }
+}
+
+
#ifdef ENABLE_DISASSEMBLER
void DeoptimizationInputData::DeoptimizationInputDataPrint(FILE* out) {
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698