Index: src/ast/ast.cc |
diff --git a/src/ast/ast.cc b/src/ast/ast.cc |
index 80726ea364030aa01d6ab307136fb3e2cc75e5a0..0c0e535329b3b7d306b86e7a9e70cb63cf39b10c 100644 |
--- a/src/ast/ast.cc |
+++ b/src/ast/ast.cc |
@@ -29,6 +29,21 @@ namespace internal { |
#ifdef DEBUG |
+static const char* NameForNativeContextIntrinsicIndex(uint32_t idx) { |
+ switch (idx) { |
+#define NATIVE_CONTEXT_FIELDS_IDX(NAME, Type, name) \ |
+ case Context::NAME: \ |
+ return #name; |
+ |
+ NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELDS_IDX) |
+ |
+ default: |
+ break; |
+ } |
+ |
+ return "UnknownIntrinsicIndex"; |
+} |
+ |
void AstNode::Print() { Print(Isolate::Current()); } |
void AstNode::Print(Isolate* isolate) { |
@@ -1064,5 +1079,13 @@ bool Literal::Match(void* literal1, void* literal2) { |
(x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); |
} |
+const char* CallRuntime::debug_name() { |
+#ifdef DEBUG |
+ return NameForNativeContextIntrinsicIndex(context_index_); |
caitp
2017/01/29 05:32:33
Hey, sorry I didn't catch this sooner. This makes
|
+#else |
+ return is_jsruntime() ? "(context function)" : function_->name; |
+#endif // DEBUG |
+} |
+ |
} // namespace internal |
} // namespace v8 |