Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index dfc5d183e0e782d01be5082857e91d8e9f52e869..605018232789b6098779a560438e436877873ce7 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -235,6 +235,8 @@ class BytecodeNodeBuilder { |
#define DEFINE_BYTECODE_OUTPUT(name, accumulator_use, ...) \ |
template <typename... Operands> \ |
void BytecodeArrayBuilder::Output##name(Operands... operands) { \ |
+ static_assert(sizeof...(Operands) <= Bytecodes::kMaxOperands, \ |
+ "too many operands for bytecode"); \ |
BytecodeNode node(BytecodeNodeBuilder<__VA_ARGS__>::Make<Operands...>( \ |
this, CurrentSourcePosition(Bytecode::k##name), Bytecode::k##name, \ |
operands...)); \ |