Index: src/interpreter/bytecodes.cc |
diff --git a/src/interpreter/bytecodes.cc b/src/interpreter/bytecodes.cc |
index c5311557fb2a5208c9d48c0e2e4723242a741300..9ee7c0a9e6ba03e12b32f6a8a93433b8af8cb048 100644 |
--- a/src/interpreter/bytecodes.cc |
+++ b/src/interpreter/bytecodes.cc |
@@ -55,6 +55,18 @@ const OperandSize* const Bytecodes::kOperandSizes[][3] = { |
BYTECODE_LIST(ENTRY) |
#undef ENTRY |
}; |
+ |
+const OperandSize Bytecodes::kOperandKindSizes[][3] = { |
+#define ENTRY(Name, ...) \ |
+ { OperandScaler<OperandType::k##Name, \ |
+ OperandScale::kSingle>::kOperandSize, \ |
+ OperandScaler<OperandType::k##Name, \ |
+ OperandScale::kDouble>::kOperandSize, \ |
+ OperandScaler<OperandType::k##Name, \ |
+ OperandScale::kQuadruple>::kOperandSize }, |
+ OPERAND_TYPE_LIST(ENTRY) |
+#undef ENTRY |
+}; |
// clang-format on |
// static |
@@ -274,31 +286,6 @@ bool Bytecodes::IsUnsignedOperandType(OperandType operand_type) { |
UNREACHABLE(); |
} |
-// static |
-OperandSize Bytecodes::SizeOfOperand(OperandType operand_type, |
- OperandScale operand_scale) { |
- DCHECK_LE(operand_type, OperandType::kLast); |
- DCHECK_GE(operand_scale, OperandScale::kSingle); |
- DCHECK_LE(operand_scale, OperandScale::kLast); |
- STATIC_ASSERT(static_cast<int>(OperandScale::kQuadruple) == 4 && |
- OperandScale::kLast == OperandScale::kQuadruple); |
- int scale_index = static_cast<int>(operand_scale) >> 1; |
- // clang-format off |
- static const OperandSize kOperandSizes[][3] = { |
-#define ENTRY(Name, ...) \ |
- { OperandScaler<OperandType::k##Name, \ |
- OperandScale::kSingle>::kOperandSize, \ |
- OperandScaler<OperandType::k##Name, \ |
- OperandScale::kDouble>::kOperandSize, \ |
- OperandScaler<OperandType::k##Name, \ |
- OperandScale::kQuadruple>::kOperandSize }, |
- OPERAND_TYPE_LIST(ENTRY) |
-#undef ENTRY |
- }; |
- // clang-format on |
- return kOperandSizes[static_cast<size_t>(operand_type)][scale_index]; |
-} |
- |
// static |
bool Bytecodes::BytecodeHasHandler(Bytecode bytecode, |
OperandScale operand_scale) { |