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

Unified Diff: test/cctest/interpreter/bytecode-expectations-printer.cc

Issue 1723223002: [Interpreter] Textual representation for runtime function IDs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« src/interpreter/bytecodes.h ('K') | « src/interpreter/bytecodes.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d5e0456511528a13bf0f68c0d81c937fa06e44c8..244c1478778c342d28eb01517349713505e87cb5 100644
--- a/test/cctest/interpreter/bytecode-expectations-printer.cc
+++ b/test/cctest/interpreter/bytecode-expectations-printer.cc
@@ -13,6 +13,7 @@
#include "src/base/logging.h"
#include "src/base/smart-pointers.h"
#include "src/compiler.h"
+#include "src/runtime/runtime.h"
#include "src/interpreter/bytecode-array-iterator.h"
#include "src/interpreter/bytecode-generator.h"
@@ -136,7 +137,13 @@ void BytecodeExpectationsPrinter::PrintBytecodeOperand(
} else {
stream << 'U' << size_tag << '(';
- if (Bytecodes::IsImmediateOperandType(op_type)) {
+ if (op_index == 0 && Bytecodes::IsCallRuntime(bytecode)) {
+ stream << "Runtime::"
+ << i::Runtime::FunctionForId(
oth 2016/02/23 17:37:15 Nit - this is a bit dense with braces and brackets
Stefano Sanfilippo 2016/02/23 17:43:50 Done.
+ static_cast<i::Runtime::FunctionId>(
+ bytecode_iter.GetIndexOperand(op_index)))
+ ->name;
+ } else if (Bytecodes::IsImmediateOperandType(op_type)) {
// We need a cast, otherwise the result is printed as char.
stream << static_cast<int>(bytecode_iter.GetImmediateOperand(op_index));
} else if (Bytecodes::IsRegisterCountOperandType(op_type)) {
« src/interpreter/bytecodes.h ('K') | « src/interpreter/bytecodes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698