Index: src/interpreter/bytecode-array-writer.h |
diff --git a/src/interpreter/bytecode-array-writer.h b/src/interpreter/bytecode-array-writer.h |
index e8d547dca43c26793a8c0536540d03778c5b140a..c5200441c9054944b565bae103957e666a4a5640 100644 |
--- a/src/interpreter/bytecode-array-writer.h |
+++ b/src/interpreter/bytecode-array-writer.h |
@@ -36,6 +36,13 @@ class BytecodeArrayWriter final : public BytecodePipelineStage { |
Handle<FixedArray> handler_table) override; |
private: |
+ // Maximum sized packed bytecode is comprised of a prefix bytecode, |
+ // plus the actual bytecode, plus the maximum number of operands times |
+ // the maximum operand size. |
+ static const size_t kMaxSizeOfPackedBytecode = |
+ 2 * sizeof(Bytecode) + |
+ Bytecodes::kMaxOperands * static_cast<size_t>(OperandSize::kLast); |
+ |
// Constants that act as placeholders for jump operands to be |
// patched. These have operand sizes that match the sizes of |
// reserved constant pool entries. |