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 2336203002: [Interpreter] Add an unsigned immediate operand type (Closed)
Patch Set: Address comments Created 4 years, 3 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-iterator.h ('k') | src/interpreter/bytecode-decoder.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/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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return BytecodeDecoder::DecodeSignedOperand(operand_start, operand_type, 90 return BytecodeDecoder::DecodeSignedOperand(operand_start, operand_type,
91 current_operand_scale()); 91 current_operand_scale());
92 } 92 }
93 93
94 uint32_t BytecodeArrayIterator::GetFlagOperand(int operand_index) const { 94 uint32_t BytecodeArrayIterator::GetFlagOperand(int operand_index) const {
95 DCHECK_EQ(Bytecodes::GetOperandType(current_bytecode(), operand_index), 95 DCHECK_EQ(Bytecodes::GetOperandType(current_bytecode(), operand_index),
96 OperandType::kFlag8); 96 OperandType::kFlag8);
97 return GetUnsignedOperand(operand_index, OperandType::kFlag8); 97 return GetUnsignedOperand(operand_index, OperandType::kFlag8);
98 } 98 }
99 99
100 uint32_t BytecodeArrayIterator::GetUnsignedImmediateOperand(
101 int operand_index) const {
102 DCHECK_EQ(Bytecodes::GetOperandType(current_bytecode(), operand_index),
103 OperandType::kUImm);
104 return GetUnsignedOperand(operand_index, OperandType::kUImm);
105 }
106
100 int32_t BytecodeArrayIterator::GetImmediateOperand(int operand_index) const { 107 int32_t BytecodeArrayIterator::GetImmediateOperand(int operand_index) const {
101 DCHECK_EQ(Bytecodes::GetOperandType(current_bytecode(), operand_index), 108 DCHECK_EQ(Bytecodes::GetOperandType(current_bytecode(), operand_index),
102 OperandType::kImm); 109 OperandType::kImm);
103 return GetSignedOperand(operand_index, OperandType::kImm); 110 return GetSignedOperand(operand_index, OperandType::kImm);
104 } 111 }
105 112
106 uint32_t BytecodeArrayIterator::GetRegisterCountOperand( 113 uint32_t BytecodeArrayIterator::GetRegisterCountOperand(
107 int operand_index) const { 114 int operand_index) const {
108 DCHECK_EQ(Bytecodes::GetOperandType(current_bytecode(), operand_index), 115 DCHECK_EQ(Bytecodes::GetOperandType(current_bytecode(), operand_index),
109 OperandType::kRegCount); 116 OperandType::kRegCount);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return current_offset() + smi->value() + current_prefix_offset(); 186 return current_offset() + smi->value() + current_prefix_offset();
180 } else { 187 } else {
181 UNREACHABLE(); 188 UNREACHABLE();
182 return kMinInt; 189 return kMinInt;
183 } 190 }
184 } 191 }
185 192
186 } // namespace interpreter 193 } // namespace interpreter
187 } // namespace internal 194 } // namespace internal
188 } // namespace v8 195 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-iterator.h ('k') | src/interpreter/bytecode-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698