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

Unified Diff: src/interpreter/bytecodes.h

Issue 2673833003: [interpreter] Create custom call opcodes for specific argument counts (Closed)
Patch Set: 32- and 64-bit ports Created 3 years, 10 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/bytecodes.h
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h
index ebdb5ab07fe552cb9f0de4d3f326c535846cdfd8..d965d01cfdc4efd5e0bf52aa8739805a8b95fe8f 100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -151,6 +151,12 @@ namespace interpreter {
OperandType::kRegCount, OperandType::kIdx) \
V(CallProperty, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
+ V(Call0, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(Call1, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \
+ OperandType::kReg, OperandType::kIdx) \
+ V(Call2, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \
+ OperandType::kReg, OperandType::kReg, OperandType::kIdx) \
V(CallWithSpread, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount) \
V(TailCall, AccumulatorUse::kWrite, OperandType::kReg, \
@@ -402,7 +408,7 @@ enum class Bytecode : uint8_t {
class V8_EXPORT_PRIVATE Bytecodes final {
public:
// The maximum number of operands a bytecode may have.
- static const int kMaxOperands = 4;
+ static const int kMaxOperands = 5;
// Returns string representation of |bytecode|.
static const char* ToString(Bytecode bytecode);
@@ -613,7 +619,9 @@ class V8_EXPORT_PRIVATE Bytecodes final {
// Returns true if the bytecode is a call or a constructor call.
static constexpr bool IsCallOrConstruct(Bytecode bytecode) {
- return bytecode == Bytecode::kCall || bytecode == Bytecode::kCallProperty ||
+ return bytecode == Bytecode::kCall || bytecode == Bytecode::kCall0 ||
+ bytecode == Bytecode::kCall1 || bytecode == Bytecode::kCall2 ||
+ bytecode == Bytecode::kCallProperty ||
bytecode == Bytecode::kTailCall || bytecode == Bytecode::kConstruct;
}

Powered by Google App Engine
This is Rietveld 408576698