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

Side by Side Diff: src/interpreter/bytecode-decoder.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.cc ('k') | src/interpreter/bytecodes.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-decoder.h" 5 #include "src/interpreter/bytecode-decoder.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 8
9 #include "src/utils.h" 9 #include "src/utils.h"
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 int operand_offset = 100 int operand_offset =
101 Bytecodes::GetOperandOffset(bytecode, i, operand_scale); 101 Bytecodes::GetOperandOffset(bytecode, i, operand_scale);
102 const uint8_t* operand_start = 102 const uint8_t* operand_start =
103 &bytecode_start[prefix_offset + operand_offset]; 103 &bytecode_start[prefix_offset + operand_offset];
104 switch (op_type) { 104 switch (op_type) {
105 case interpreter::OperandType::kRegCount: 105 case interpreter::OperandType::kRegCount:
106 os << "#" 106 os << "#"
107 << DecodeUnsignedOperand(operand_start, op_type, operand_scale); 107 << DecodeUnsignedOperand(operand_start, op_type, operand_scale);
108 break; 108 break;
109 case interpreter::OperandType::kIdx: 109 case interpreter::OperandType::kIdx:
110 case interpreter::OperandType::kUImm:
110 case interpreter::OperandType::kRuntimeId: 111 case interpreter::OperandType::kRuntimeId:
111 case interpreter::OperandType::kIntrinsicId: 112 case interpreter::OperandType::kIntrinsicId:
112 os << "[" 113 os << "["
113 << DecodeUnsignedOperand(operand_start, op_type, operand_scale) 114 << DecodeUnsignedOperand(operand_start, op_type, operand_scale)
114 << "]"; 115 << "]";
115 break; 116 break;
116 case interpreter::OperandType::kImm: 117 case interpreter::OperandType::kImm:
117 os << "[" << DecodeSignedOperand(operand_start, op_type, operand_scale) 118 os << "[" << DecodeSignedOperand(operand_start, op_type, operand_scale)
118 << "]"; 119 << "]";
119 break; 120 break;
(...skipping 28 matching lines...) Expand all
148 if (i != number_of_operands - 1) { 149 if (i != number_of_operands - 1) {
149 os << ", "; 150 os << ", ";
150 } 151 }
151 } 152 }
152 return os; 153 return os;
153 } 154 }
154 155
155 } // namespace interpreter 156 } // namespace interpreter
156 } // namespace internal 157 } // namespace internal
157 } // namespace v8 158 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-iterator.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698