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

Unified Diff: src/interpreter/bytecodes.h

Issue 2684993002: [interpreter] Create custom call opcodes for specific argument counts (Closed)
Patch Set: Latest 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 41fac412263d99081381bb18d7d2bf0e29d5fc3c..0a1c568cc73646bef957386a32e9b8649b595d2a 100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -152,8 +152,21 @@ namespace interpreter {
/* Call operations */ \
V(Call, 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(CallProperty, AccumulatorUse::kWrite, OperandType::kReg, \
OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
+ V(CallProperty0, AccumulatorUse::kWrite, OperandType::kReg, \
+ OperandType::kReg, OperandType::kIdx) \
+ V(CallProperty1, AccumulatorUse::kWrite, OperandType::kReg, \
+ OperandType::kReg, OperandType::kReg, OperandType::kIdx) \
+ V(CallProperty2, 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, \
@@ -405,7 +418,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);
@@ -619,6 +632,12 @@ 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 ||
+ bytecode == Bytecode::kCall0 ||
+ bytecode == Bytecode::kCallProperty0 ||
+ bytecode == Bytecode::kCall1 ||
+ bytecode == Bytecode::kCallProperty1 ||
+ bytecode == Bytecode::kCall2 ||
+ bytecode == Bytecode::kCallProperty2 ||
bytecode == Bytecode::kTailCall ||
bytecode == Bytecode::kConstruct ||
bytecode == Bytecode::kCallWithSpread ||

Powered by Google App Engine
This is Rietveld 408576698