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

Unified Diff: src/ast/ast.cc

Issue 2693063005: [ast-printer] Print useful runtime function names for non-jsruntime calls (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.cc
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index 605640af1030504372c8a82bf1ce2a9786494b73..51afdac51e5ca06be4d339bc5522921fdd64b51a 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -37,6 +37,7 @@ static const char* NameForNativeContextIntrinsicIndex(uint32_t idx) {
return #name;
NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELDS_IDX)
+#undef NATIVE_CONTEXT_FIELDS_IDX
default:
break;
@@ -1103,7 +1104,8 @@ bool Literal::Match(void* literal1, void* literal2) {
const char* CallRuntime::debug_name() {
#ifdef DEBUG
- return NameForNativeContextIntrinsicIndex(context_index_);
+ return is_jsruntime() ? NameForNativeContextIntrinsicIndex(context_index_)
+ : function_->name;
#else
return is_jsruntime() ? "(context function)" : function_->name;
#endif // DEBUG
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698