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

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: Expand function doc. 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/interpreter.h ('k') | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 28ff9d571cb464a7849bbfb3dfbe38b0e5a33fb5..8d9eb54759e3dd892d503292b2aebf436277d3a4 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -38,7 +38,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); \
@@ -70,7 +70,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];
}
@@ -88,13 +88,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]),
« no previous file with comments | « src/interpreter/interpreter.h ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698