Index: src/compiler/bytecode-analysis.cc |
diff --git a/src/compiler/bytecode-analysis.cc b/src/compiler/bytecode-analysis.cc |
index e531e75b8c37986b7a746ed1a0b65eaddb29b202..13185db208b141c145c0888e789f8aebff16f470 100644 |
--- a/src/compiler/bytecode-analysis.cc |
+++ b/src/compiler/bytecode-analysis.cc |
@@ -28,31 +28,17 @@ void BytecodeLoopAssignments::Add(interpreter::Register r) { |
} |
} |
-void BytecodeLoopAssignments::AddPair(interpreter::Register r) { |
+void BytecodeLoopAssignments::AddList(interpreter::Register r, uint32_t count) { |
if (r.is_parameter()) { |
- DCHECK(interpreter::Register(r.index() + 1).is_parameter()); |
- bit_vector_->Add(r.ToParameterIndex(parameter_count_)); |
- bit_vector_->Add(r.ToParameterIndex(parameter_count_) + 1); |
- } else { |
- DCHECK(!interpreter::Register(r.index() + 1).is_parameter()); |
- bit_vector_->Add(parameter_count_ + r.index()); |
- bit_vector_->Add(parameter_count_ + r.index() + 1); |
- } |
-} |
- |
-void BytecodeLoopAssignments::AddTriple(interpreter::Register r) { |
- if (r.is_parameter()) { |
- DCHECK(interpreter::Register(r.index() + 1).is_parameter()); |
- DCHECK(interpreter::Register(r.index() + 2).is_parameter()); |
- bit_vector_->Add(r.ToParameterIndex(parameter_count_)); |
- bit_vector_->Add(r.ToParameterIndex(parameter_count_) + 1); |
- bit_vector_->Add(r.ToParameterIndex(parameter_count_) + 2); |
+ for (uint32_t i = 0; i < count; i++) { |
+ DCHECK(interpreter::Register(r.index() + i).is_parameter()); |
+ bit_vector_->Add(r.ToParameterIndex(parameter_count_) + i); |
+ } |
} else { |
- DCHECK(!interpreter::Register(r.index() + 1).is_parameter()); |
- DCHECK(!interpreter::Register(r.index() + 2).is_parameter()); |
- bit_vector_->Add(parameter_count_ + r.index()); |
- bit_vector_->Add(parameter_count_ + r.index() + 1); |
- bit_vector_->Add(parameter_count_ + r.index() + 2); |
+ for (uint32_t i = 0; i < count; i++) { |
+ DCHECK(!interpreter::Register(r.index() + i).is_parameter()); |
+ bit_vector_->Add(parameter_count_ + r.index() + i); |
+ } |
} |
} |
@@ -112,6 +98,17 @@ void UpdateInLiveness(Bytecode bytecode, BytecodeLivenessState& in_liveness, |
} |
break; |
} |
+ case OperandType::kRegOutList: { |
+ interpreter::Register r = accessor.GetRegisterOperand(i++); |
+ uint32_t reg_count = accessor.GetRegisterCountOperand(i); |
+ if (!r.is_parameter()) { |
+ for (uint32_t j = 0; j < reg_count; ++j) { |
+ DCHECK(!interpreter::Register(r.index() + j).is_parameter()); |
+ in_liveness.MarkRegisterDead(r.index() + j); |
+ } |
+ } |
+ break; |
+ } |
case OperandType::kRegOutPair: { |
interpreter::Register r = accessor.GetRegisterOperand(i); |
if (!r.is_parameter()) { |
@@ -227,12 +224,18 @@ void UpdateAssignments(Bytecode bytecode, BytecodeLoopAssignments& assignments, |
assignments.Add(accessor.GetRegisterOperand(i)); |
break; |
} |
+ case OperandType::kRegOutList: { |
+ interpreter::Register r = accessor.GetRegisterOperand(i++); |
+ uint32_t reg_count = accessor.GetRegisterCountOperand(i); |
+ assignments.AddList(r, reg_count); |
+ break; |
+ } |
case OperandType::kRegOutPair: { |
- assignments.AddPair(accessor.GetRegisterOperand(i)); |
+ assignments.AddList(accessor.GetRegisterOperand(i), 2); |
break; |
} |
case OperandType::kRegOutTriple: { |
- assignments.AddTriple(accessor.GetRegisterOperand(i)); |
+ assignments.AddList(accessor.GetRegisterOperand(i), 3); |
break; |
} |
default: |