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

Unified Diff: src/interpreter/interpreter.cc

Issue 1830593002: [Interpreter] Move BytecodeHasHandler() from Interpreter to Bytecodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fix-codelog
Patch Set: 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
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 964fc858b81cd874584a679e6c42f86ec0b92c44..0ebbf8a4ed13f8f0f2a0abcbb467e35355969935 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -39,7 +39,7 @@ void Interpreter::Initialize() {
operand_scale = Bytecodes::NextOperandScale(operand_scale)) {
#define GENERATE_CODE(Name, ...) \
{ \
- if (BytecodeHasHandler(Bytecode::k##Name, operand_scale)) { \
+ if (Bytecodes::BytecodeHasHandler(Bytecode::k##Name, operand_scale)) { \
InterpreterAssembler assembler(isolate_, &zone, Bytecode::k##Name, \
operand_scale); \
Do##Name(&assembler); \
@@ -71,7 +71,7 @@ void Interpreter::Initialize() {
Code* Interpreter::GetBytecodeHandler(Bytecode bytecode,
OperandScale operand_scale) {
DCHECK(IsDispatchTableInitialized());
- DCHECK(BytecodeHasHandler(bytecode, operand_scale));
+ DCHECK(Bytecodes::BytecodeHasHandler(bytecode, operand_scale));
size_t index = GetDispatchTableIndex(bytecode, operand_scale);
return dispatch_table_[index];
}
@@ -89,13 +89,6 @@ size_t Interpreter::GetDispatchTableIndex(Bytecode bytecode,
return index;
}
-// static
-bool Interpreter::BytecodeHasHandler(Bytecode bytecode,
- OperandScale operand_scale) {
- return operand_scale == OperandScale::kSingle ||
- Bytecodes::IsBytecodeWithScalableOperands(bytecode);
-}
-
void Interpreter::IterateDispatchTable(ObjectVisitor* v) {
v->VisitPointers(
reinterpret_cast<Object**>(&dispatch_table_[0]),
« src/interpreter/bytecodes.h ('K') | « src/interpreter/bytecodes.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698