Commit 6e31fcfe authored by adamk's avatar adamk Committed by Commit bot

[ast-printer] Print useful runtime function names for non-jsruntime calls

R=gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2693063005
Cr-Commit-Position: refs/heads/master@{#43226}
parent c96a47de
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment