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

Unified Diff: src/interpreter/bytecode-register-optimizer.cc

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
« no previous file with comments | « src/interpreter/bytecode-register-allocator.h ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-register-optimizer.cc
diff --git a/src/interpreter/bytecode-register-optimizer.cc b/src/interpreter/bytecode-register-optimizer.cc
index 9ee80749bb1b915b699f859405cfcfc8ca62f5f6..acbe0ba5a1235b0782934fba25517c1f31923ff8 100644
--- a/src/interpreter/bytecode-register-optimizer.cc
+++ b/src/interpreter/bytecode-register-optimizer.cc
@@ -533,9 +533,9 @@ void BytecodeRegisterOptimizer::PrepareRegisterOperands(
Bytecodes::GetOperandTypes(node->bytecode());
for (int i = 0; i < operand_count; ++i) {
int count;
- // operand_types is terminated by OperandType::kNone so this does not
- // go out of bounds.
- if (operand_types[i + 1] == OperandType::kRegCount) {
+ if (operand_types[i] == OperandType::kRegList) {
+ DCHECK_LT(i, operand_count - 1);
+ DCHECK(operand_types[i + 1] == OperandType::kRegCount);
count = static_cast<int>(operands[i + 1]);
} else {
count = Bytecodes::GetNumberOfRegistersRepresentedBy(operand_types[i]);
« no previous file with comments | « src/interpreter/bytecode-register-allocator.h ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698