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

Side by Side Diff: src/interpreter/bytecode-array-iterator.cc

Issue 1659023002: [interpreter] Unify meaning of register count operands. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 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 unified diff | Download patch
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('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/objects-inl.h" 7 #include "src/objects-inl.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 case OperandType::kRegPair16: 121 case OperandType::kRegPair16:
122 case OperandType::kRegOutPair8: 122 case OperandType::kRegOutPair8:
123 case OperandType::kRegOutPair16: 123 case OperandType::kRegOutPair16:
124 return 2; 124 return 2;
125 case OperandType::kRegOutTriple8: 125 case OperandType::kRegOutTriple8:
126 case OperandType::kRegOutTriple16: 126 case OperandType::kRegOutTriple16:
127 return 3; 127 return 3;
128 default: { 128 default: {
129 if (operand_index + 1 != 129 if (operand_index + 1 !=
130 Bytecodes::NumberOfOperands(current_bytecode())) { 130 Bytecodes::NumberOfOperands(current_bytecode())) {
131 // TODO(oth): Ensure all bytecodes specify the full range of registers
132 // with kRegCount (currently Call/CallJSRuntime are off by one due to
133 // reciever.
134 OperandType next_operand_type = 131 OperandType next_operand_type =
135 Bytecodes::GetOperandType(current_bytecode(), operand_index + 1); 132 Bytecodes::GetOperandType(current_bytecode(), operand_index + 1);
136 if (Bytecodes::IsRegisterCountOperandType(next_operand_type)) { 133 if (Bytecodes::IsRegisterCountOperandType(next_operand_type)) {
137 return GetCountOperand(operand_index + 1); 134 return GetCountOperand(operand_index + 1);
138 } 135 }
139 } 136 }
140 return 1; 137 return 1;
141 } 138 }
142 } 139 }
143 } 140 }
(...skipping 17 matching lines...) Expand all
161 return current_offset() + smi->value(); 158 return current_offset() + smi->value();
162 } else { 159 } else {
163 UNREACHABLE(); 160 UNREACHABLE();
164 return kMinInt; 161 return kMinInt;
165 } 162 }
166 } 163 }
167 164
168 } // namespace interpreter 165 } // namespace interpreter
169 } // namespace internal 166 } // namespace internal
170 } // namespace v8 167 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698