Index: src/interpreter/interpreter.h |
diff --git a/src/interpreter/interpreter.h b/src/interpreter/interpreter.h |
index 647f95849d004dbc9e17dde14707e5f4b8f35a0e..075fe741e943f064f22184c727cc04c823ea3fb3 100644 |
--- a/src/interpreter/interpreter.h |
+++ b/src/interpreter/interpreter.h |
@@ -40,7 +40,7 @@ class Interpreter { |
static bool MakeBytecode(CompilationInfo* info); |
// Return bytecode handler for |bytecode|. |
- Code* GetBytecodeHandler(Bytecode bytecode); |
+ Code* GetBytecodeHandler(Bytecode bytecode, OperandScale operand_scale); |
// GC support. |
void IterateDispatchTable(ObjectVisitor* v); |
@@ -53,6 +53,10 @@ class Interpreter { |
return reinterpret_cast<Address>(&dispatch_table_[0]); |
} |
+ // Returns true if a handler is generated for a bytecode at a given |
+ // operand scale. |
+ static bool BytecodeHasHandler(Bytecode bytecode, OperandScale operand_scale); |
+ |
private: |
// Bytecode handler generator functions. |
#define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ |
@@ -130,9 +134,14 @@ class Interpreter { |
void DoStoreLookupSlot(LanguageMode language_mode, |
InterpreterAssembler* assembler); |
+ // Get dispatch table index of bytecode. |
+ static size_t GetDispatchTableIndex(Bytecode bytecode, |
+ OperandScale operand_scale); |
+ |
bool IsDispatchTableInitialized(); |
- static const int kDispatchTableSize = static_cast<int>(Bytecode::kLast) + 1; |
+ static const int kNumberOfWideVariants = 3; |
+ static const int kDispatchTableSize = kNumberOfWideVariants * (kMaxUInt8 + 1); |
Isolate* isolate_; |
Code* dispatch_table_[kDispatchTableSize]; |