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

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

Issue 1568493002: [Interpreter] Add support for calling runtime functions which return a pair. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michi's review comments. Created 4 years, 11 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 #include "src/interpreter/bytecode-traits.h" 8 #include "src/interpreter/bytecode-traits.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 if (parameter_index == 0) { 286 if (parameter_index == 0) {
287 os << "<this>"; 287 os << "<this>";
288 } else { 288 } else {
289 os << "a" << parameter_index - 1; 289 os << "a" << parameter_index - 1;
290 } 290 }
291 } else { 291 } else {
292 os << "r" << reg.index(); 292 os << "r" << reg.index();
293 } 293 }
294 break; 294 break;
295 } 295 }
296 case interpreter::OperandType::kRegPair8: {
297 Register reg = Register::FromOperand(*operand_start);
298 if (reg.is_parameter()) {
299 int parameter_index = reg.ToParameterIndex(parameter_count);
300 DCHECK_NE(parameter_index, 0);
301 os << "a" << parameter_index - 1 << "-" << parameter_index;
302 } else {
303 os << "r" << reg.index() << "-" << reg.index() + 1;
304 }
305 break;
306 }
296 case interpreter::OperandType::kReg16: { 307 case interpreter::OperandType::kReg16: {
297 Register reg = 308 Register reg =
298 Register::FromWideOperand(ReadUnalignedUInt16(operand_start)); 309 Register::FromWideOperand(ReadUnalignedUInt16(operand_start));
299 if (reg.is_parameter()) { 310 if (reg.is_parameter()) {
300 int parameter_index = reg.ToParameterIndex(parameter_count); 311 int parameter_index = reg.ToParameterIndex(parameter_count);
301 DCHECK_NE(parameter_index, 0); 312 DCHECK_NE(parameter_index, 0);
302 os << "a" << parameter_index - 1; 313 os << "a" << parameter_index - 1;
303 } else { 314 } else {
304 os << "r" << reg.index(); 315 os << "r" << reg.index();
305 } 316 }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } 444 }
434 if (reg5.is_valid() && reg4.index() + 1 != reg5.index()) { 445 if (reg5.is_valid() && reg4.index() + 1 != reg5.index()) {
435 return false; 446 return false;
436 } 447 }
437 return true; 448 return true;
438 } 449 }
439 450
440 } // namespace interpreter 451 } // namespace interpreter
441 } // namespace internal 452 } // namespace internal
442 } // namespace v8 453 } // 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