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

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

Issue 2084623002: Reland: [Interpreter] Map runtime id's to intrinsic id's in InvokeIntrinsic bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reland Created 4 years, 6 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
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 b0f623611eccd96e3d8019b01f2378e2866fe1df..83f11c6d424c779a89aa25065fdb50e5aa640648 100644
--- a/test/cctest/interpreter/bytecode-expectations-printer.cc
+++ b/test/cctest/interpreter/bytecode-expectations-printer.cc
@@ -19,6 +19,7 @@
#include "src/interpreter/bytecode-array-iterator.h"
#include "src/interpreter/bytecode-generator.h"
#include "src/interpreter/bytecodes.h"
+#include "src/interpreter/interpreter-intrinsics.h"
#include "src/interpreter/interpreter.h"
#include "src/interpreter/source-position-table.h"
@@ -98,12 +99,6 @@ void BytecodeExpectationsPrinter::PrintEscapedString(
}
}
-namespace {
-i::Runtime::FunctionId IndexToFunctionId(uint32_t index) {
- return static_cast<i::Runtime::FunctionId>(index);
-}
-} // namespace
-
void BytecodeExpectationsPrinter::PrintBytecodeOperand(
std::ostream& stream, const BytecodeArrayIterator& bytecode_iterator,
const Bytecode& bytecode, int op_index, int parameter_count) const {
@@ -164,9 +159,15 @@ void BytecodeExpectationsPrinter::PrintBytecodeOperand(
stream << bytecode_iterator.GetRegisterCountOperand(op_index);
break;
case OperandType::kRuntimeId: {
- uint32_t operand = bytecode_iterator.GetRuntimeIdOperand(op_index);
- stream << "Runtime::k"
- << i::Runtime::FunctionForId(IndexToFunctionId(operand))->name;
+ Runtime::FunctionId id =
+ bytecode_iterator.GetRuntimeIdOperand(op_index);
+ stream << "Runtime::k" << i::Runtime::FunctionForId(id)->name;
+ break;
+ }
+ case OperandType::kIntrinsicId: {
+ Runtime::FunctionId id =
+ bytecode_iterator.GetIntrinsicIdOperand(op_index);
+ stream << "Runtime::k" << i::Runtime::FunctionForId(id)->name;
break;
}
default:
« no previous file with comments | « src/interpreter/interpreter-intrinsics.cc ('k') | test/cctest/interpreter/bytecode_expectations/ForOf.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698