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

Side by Side Diff: src/interpreter/bytecode-array-iterator.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 unified diff | Download patch
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/interpreter/bytecode-array-iterator.h" 5 #include "src/interpreter/bytecode-array-iterator.h"
6 6
7 #include "src/interpreter/bytecode-decoder.h" 7 #include "src/interpreter/bytecode-decoder.h"
8 #include "src/interpreter/interpreter-intrinsics.h" 8 #include "src/interpreter/interpreter-intrinsics.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 Bytecodes::GetOperandOffset(current_bytecode(), operand_index, 133 Bytecodes::GetOperandOffset(current_bytecode(), operand_index,
134 current_operand_scale()); 134 current_operand_scale());
135 return BytecodeDecoder::DecodeRegisterOperand(operand_start, operand_type, 135 return BytecodeDecoder::DecodeRegisterOperand(operand_start, operand_type,
136 current_operand_scale()); 136 current_operand_scale());
137 } 137 }
138 138
139 int BytecodeArrayIterator::GetRegisterOperandRange(int operand_index) const { 139 int BytecodeArrayIterator::GetRegisterOperandRange(int operand_index) const {
140 DCHECK_LE(operand_index, Bytecodes::NumberOfOperands(current_bytecode())); 140 DCHECK_LE(operand_index, Bytecodes::NumberOfOperands(current_bytecode()));
141 const OperandType* operand_types = 141 const OperandType* operand_types =
142 Bytecodes::GetOperandTypes(current_bytecode()); 142 Bytecodes::GetOperandTypes(current_bytecode());
143 DCHECK(Bytecodes::IsRegisterOperandType(operand_types[operand_index])); 143 OperandType operand_type = operand_types[operand_index];
144 if (operand_types[operand_index + 1] == OperandType::kRegCount) { 144 DCHECK(Bytecodes::IsRegisterOperandType(operand_type));
145 if (operand_type == OperandType::kRegList) {
145 return GetRegisterCountOperand(operand_index + 1); 146 return GetRegisterCountOperand(operand_index + 1);
146 } else { 147 } else {
147 OperandType operand_type = operand_types[operand_index];
148 return Bytecodes::GetNumberOfRegistersRepresentedBy(operand_type); 148 return Bytecodes::GetNumberOfRegistersRepresentedBy(operand_type);
149 } 149 }
150 } 150 }
151 151
152 Runtime::FunctionId BytecodeArrayIterator::GetRuntimeIdOperand( 152 Runtime::FunctionId BytecodeArrayIterator::GetRuntimeIdOperand(
153 int operand_index) const { 153 int operand_index) const {
154 OperandType operand_type = 154 OperandType operand_type =
155 Bytecodes::GetOperandType(current_bytecode(), operand_index); 155 Bytecodes::GetOperandType(current_bytecode(), operand_index);
156 DCHECK(operand_type == OperandType::kRuntimeId); 156 DCHECK(operand_type == OperandType::kRuntimeId);
157 uint32_t raw_id = GetUnsignedOperand(operand_index, operand_type); 157 uint32_t raw_id = GetUnsignedOperand(operand_index, operand_type);
(...skipping 28 matching lines...) Expand all
186 return current_offset() + smi->value() + current_prefix_offset(); 186 return current_offset() + smi->value() + current_prefix_offset();
187 } else { 187 } else {
188 UNREACHABLE(); 188 UNREACHABLE();
189 return kMinInt; 189 return kMinInt;
190 } 190 }
191 } 191 }
192 192
193 } // namespace interpreter 193 } // namespace interpreter
194 } // namespace internal 194 } // namespace internal
195 } // namespace v8 195 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698