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

Side by Side Diff: src/interpreter/bytecodes.cc

Issue 1323463005: [Interpreter] Add support for JS calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add MIPS port contributed by akos.palfi@imgtec.com Created 5 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/bytecodes.h ('k') | src/interpreter/interpreter.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/bytecodes.h" 5 #include "src/interpreter/bytecodes.h"
6 6
7 #include "src/frames.h" 7 #include "src/frames.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 os << bytecode << " "; 121 os << bytecode << " ";
122 122
123 const uint8_t* operands_start = bytecode_start + 1; 123 const uint8_t* operands_start = bytecode_start + 1;
124 int operands_size = bytecode_size - 1; 124 int operands_size = bytecode_size - 1;
125 for (int i = 0; i < operands_size; i++) { 125 for (int i = 0; i < operands_size; i++) {
126 OperandType op_type = GetOperandType(bytecode, i); 126 OperandType op_type = GetOperandType(bytecode, i);
127 uint8_t operand = operands_start[i]; 127 uint8_t operand = operands_start[i];
128 switch (op_type) { 128 switch (op_type) {
129 case interpreter::OperandType::kCount:
130 os << "#" << static_cast<unsigned int>(operand);
131 break;
129 case interpreter::OperandType::kIdx: 132 case interpreter::OperandType::kIdx:
130 os << "[" << static_cast<unsigned int>(operand) << "]"; 133 os << "[" << static_cast<unsigned int>(operand) << "]";
131 break; 134 break;
132 case interpreter::OperandType::kImm8: 135 case interpreter::OperandType::kImm8:
133 os << "#" << static_cast<int>(operand); 136 os << "#" << static_cast<int>(operand);
134 break; 137 break;
135 case interpreter::OperandType::kReg: { 138 case interpreter::OperandType::kReg: {
136 Register reg = Register::FromOperand(operand); 139 Register reg = Register::FromOperand(operand);
137 if (reg.is_parameter()) { 140 if (reg.is_parameter()) {
138 int parameter_index = reg.ToParameterIndex(parameter_count); 141 int parameter_index = reg.ToParameterIndex(parameter_count);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 uint8_t Register::ToOperand() const { return static_cast<uint8_t>(-index_); } 204 uint8_t Register::ToOperand() const { return static_cast<uint8_t>(-index_); }
202 205
203 206
204 Register Register::FromOperand(uint8_t operand) { 207 Register Register::FromOperand(uint8_t operand) {
205 return Register(-static_cast<int8_t>(operand)); 208 return Register(-static_cast<int8_t>(operand));
206 } 209 }
207 210
208 } // namespace interpreter 211 } // namespace interpreter
209 } // namespace internal 212 } // namespace internal
210 } // namespace v8 213 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698