Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1611)

Unified Diff: src/interpreter/interpreter.h

Issue 1783483002: [interpreter] Add support for scalable operands. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Re-generate golden files. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/constant-array-builder.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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];
« no previous file with comments | « src/interpreter/constant-array-builder.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698