Index: test/cctest/interpreter/bytecode-expectations-printer.cc |
diff --git a/test/cctest/interpreter/bytecode-expectations-printer.cc b/test/cctest/interpreter/bytecode-expectations-printer.cc |
index f7a5bb94670f96da4a29e25cfc2568ffdee0915f..8f34308ee0e839ead35ce31ec9d5726a47f77924 100644 |
--- a/test/cctest/interpreter/bytecode-expectations-printer.cc |
+++ b/test/cctest/interpreter/bytecode-expectations-printer.cc |
@@ -25,6 +25,21 @@ namespace v8 { |
namespace internal { |
namespace interpreter { |
+static const char* NameForNativeContextIntrinsicIndex(uint32_t idx) { |
+ switch (idx) { |
+#define COMPARE_NATIVE_CONTEXT_INTRINSIC_IDX(NAME, Type, name) \ |
+ case Context::NAME: \ |
+ return #name; |
+ |
+ NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(COMPARE_NATIVE_CONTEXT_INTRINSIC_IDX) |
+ |
+ default: |
+ break; |
+ } |
+ |
+ return "UnknownIntrinsicIndex"; |
+} |
+ |
// static |
const char* const BytecodeExpectationsPrinter::kDefaultTopFunctionName = |
"__genbckexp_wrapper__"; |
@@ -162,9 +177,15 @@ void BytecodeExpectationsPrinter::PrintBytecodeOperand( |
case OperandType::kFlag8: |
stream << bytecode_iterator.GetFlagOperand(op_index); |
break; |
- case OperandType::kIdx: |
- stream << bytecode_iterator.GetIndexOperand(op_index); |
+ case OperandType::kIdx: { |
+ uint32_t idx = bytecode_iterator.GetIndexOperand(op_index); |
+ if (bytecode == Bytecode::kCallJSRuntime && op_index == 0) { |
+ stream << "%" << NameForNativeContextIntrinsicIndex(idx); |
+ } else { |
+ stream << idx; |
+ } |
break; |
+ } |
case OperandType::kUImm: |
stream << bytecode_iterator.GetUnsignedImmediateOperand(op_index); |
break; |