Index: src/compiler/interpreter-assembler.cc |
diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc |
index 84d7c878a5fc3e978f26d4d4ac2f47f1613edad5..57f554941293182692d8c6b65bcb89f0f977fc49 100644 |
--- a/src/compiler/interpreter-assembler.cc |
+++ b/src/compiler/interpreter-assembler.cc |
@@ -193,9 +193,21 @@ Node* InterpreterAssembler::BytecodeOperandShort(int operand_index) { |
Node* InterpreterAssembler::BytecodeOperandCount(int operand_index) { |
- DCHECK_EQ(interpreter::OperandType::kCount8, |
- interpreter::Bytecodes::GetOperandType(bytecode_, operand_index)); |
- return BytecodeOperand(operand_index); |
+ switch (interpreter::Bytecodes::GetOperandSize(bytecode_, operand_index)) { |
+ case interpreter::OperandSize::kByte: |
+ DCHECK_EQ( |
+ interpreter::OperandType::kCount8, |
+ interpreter::Bytecodes::GetOperandType(bytecode_, operand_index)); |
+ return BytecodeOperand(operand_index); |
+ case interpreter::OperandSize::kShort: |
+ DCHECK_EQ( |
+ interpreter::OperandType::kCount16, |
+ interpreter::Bytecodes::GetOperandType(bytecode_, operand_index)); |
+ return BytecodeOperandShort(operand_index); |
+ default: |
+ UNREACHABLE(); |
+ return nullptr; |
+ } |
} |