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

Unified Diff: src/interpreter/bytecodes.h

Issue 2382273002: [Interpreter]: Add kRegList operand type for register list operands. (Closed)
Patch Set: Address comments Created 4 years, 2 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 5de9effd42f79a7dd8eb39e4c64b022b511fa71d..6232966bbca1abd5d655d46f1a915fcf613d26cf 100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -143,24 +143,24 @@ namespace interpreter {
V(DeletePropertySloppy, AccumulatorUse::kReadWrite, OperandType::kReg) \
\
/* Call operations */ \
- V(Call, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \
- OperandType::kRegCount, OperandType::kIdx) \
- V(TailCall, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \
+ V(Call, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kRegList, \
OperandType::kRegCount, OperandType::kIdx) \
+ V(TailCall, AccumulatorUse::kWrite, OperandType::kReg, \
+ OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
V(CallRuntime, AccumulatorUse::kWrite, OperandType::kRuntimeId, \
- OperandType::kMaybeReg, OperandType::kRegCount) \
+ OperandType::kRegList, OperandType::kRegCount) \
V(CallRuntimeForPair, AccumulatorUse::kNone, OperandType::kRuntimeId, \
- OperandType::kMaybeReg, OperandType::kRegCount, OperandType::kRegOutPair) \
+ OperandType::kRegList, OperandType::kRegCount, OperandType::kRegOutPair) \
V(CallJSRuntime, AccumulatorUse::kWrite, OperandType::kIdx, \
- OperandType::kReg, OperandType::kRegCount) \
+ OperandType::kRegList, OperandType::kRegCount) \
\
/* Intrinsics */ \
V(InvokeIntrinsic, AccumulatorUse::kWrite, OperandType::kIntrinsicId, \
- OperandType::kMaybeReg, OperandType::kRegCount) \
+ OperandType::kRegList, OperandType::kRegCount) \
\
/* New operator */ \
- V(New, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kMaybeReg, OperandType::kRegCount, OperandType::kIdx) \
+ V(New, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kRegList, \
+ OperandType::kRegCount, OperandType::kIdx) \
\
/* Test Operators */ \
V(TestEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
@@ -648,10 +648,11 @@ class Bytecodes final {
static bool IsStarLookahead(Bytecode bytecode, OperandScale operand_scale);
// Returns the number of registers represented by a register operand. For
- // instance, a RegPair represents two registers.
+ // instance, a RegPair represents two registers. Should not be called for
+ // kRegList which has a variable number of registers based on the following
+ // kRegCount operand.
static int GetNumberOfRegistersRepresentedBy(OperandType operand_type) {
switch (operand_type) {
- case OperandType::kMaybeReg:
case OperandType::kReg:
case OperandType::kRegOut:
return 1;
@@ -660,6 +661,9 @@ class Bytecodes final {
return 2;
case OperandType::kRegOutTriple:
return 3;
+ case OperandType::kRegList:
+ UNREACHABLE();
+ return 0;
default:
return 0;
}
« no previous file with comments | « src/interpreter/bytecode-register-optimizer.cc ('k') | test/unittests/interpreter/bytecode-decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698