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

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

Issue 1684113002: [Interpreter] Handle negative ints in generate-bytecode-expectations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move IsImmediateOperandType. 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 | « no previous file | src/interpreter/bytecodes.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 #ifndef V8_INTERPRETER_BYTECODES_H_ 5 #ifndef V8_INTERPRETER_BYTECODES_H_
6 #define V8_INTERPRETER_BYTECODES_H_ 6 #define V8_INTERPRETER_BYTECODES_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 // Clients of this interface shouldn't depend on lots of interpreter internals. 10 // Clients of this interface shouldn't depend on lots of interpreter internals.
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 // constant pool entry (OperandType::kIdx16). 456 // constant pool entry (OperandType::kIdx16).
457 static bool IsJumpConstantWide(Bytecode bytecode); 457 static bool IsJumpConstantWide(Bytecode bytecode);
458 458
459 // Returns true if the bytecode is a jump or conditional jump taking 459 // Returns true if the bytecode is a jump or conditional jump taking
460 // any kind of operand. 460 // any kind of operand.
461 static bool IsJump(Bytecode bytecode); 461 static bool IsJump(Bytecode bytecode);
462 462
463 // Returns true if the bytecode is a conditional jump, a jump, or a return. 463 // Returns true if the bytecode is a conditional jump, a jump, or a return.
464 static bool IsJumpOrReturn(Bytecode bytecode); 464 static bool IsJumpOrReturn(Bytecode bytecode);
465 465
466 // Returns true if |operand_type| is a maybe register operand 466 // Returns true if |operand_type| is a register index operand (kIdx8/kIdx16).
467 // (kMaybeReg8/kMaybeReg16). 467 static bool IsIndexOperandType(OperandType operand_type);
468 static bool IsMaybeRegisterOperandType(OperandType operand_type); 468
469 // Returns true if |operand_type| represents an immediate.
470 static bool IsImmediateOperandType(OperandType operand_type);
469 471
470 // Returns true if |operand_type| is a register count operand 472 // Returns true if |operand_type| is a register count operand
471 // (kRegCount8/kRegCount16). 473 // (kRegCount8/kRegCount16).
472 static bool IsRegisterCountOperandType(OperandType operand_type); 474 static bool IsRegisterCountOperandType(OperandType operand_type);
473 475
474 // Returns true if |operand_type| is any type of register operand. 476 // Returns true if |operand_type| is any type of register operand.
475 static bool IsRegisterOperandType(OperandType operand_type); 477 static bool IsRegisterOperandType(OperandType operand_type);
476 478
477 // Returns true if |operand_type| represents a register used as an input. 479 // Returns true if |operand_type| represents a register used as an input.
478 static bool IsRegisterInputOperandType(OperandType operand_type); 480 static bool IsRegisterInputOperandType(OperandType operand_type);
479 481
480 // Returns true if |operand_type| represents a register used as an output. 482 // Returns true if |operand_type| represents a register used as an output.
481 static bool IsRegisterOutputOperandType(OperandType operand_type); 483 static bool IsRegisterOutputOperandType(OperandType operand_type);
482 484
485 // Returns true if |operand_type| is a maybe register operand
486 // (kMaybeReg8/kMaybeReg16).
487 static bool IsMaybeRegisterOperandType(OperandType operand_type);
488
483 // Decode a single bytecode and operands to |os|. 489 // Decode a single bytecode and operands to |os|.
484 static std::ostream& Decode(std::ostream& os, const uint8_t* bytecode_start, 490 static std::ostream& Decode(std::ostream& os, const uint8_t* bytecode_start,
485 int number_of_parameters); 491 int number_of_parameters);
486 492
487 private: 493 private:
488 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes); 494 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes);
489 }; 495 };
490 496
491 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); 497 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode);
492 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); 498 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type);
493 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type); 499 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type);
494 500
495 } // namespace interpreter 501 } // namespace interpreter
496 } // namespace internal 502 } // namespace internal
497 } // namespace v8 503 } // namespace v8
498 504
499 #endif // V8_INTERPRETER_BYTECODES_H_ 505 #endif // V8_INTERPRETER_BYTECODES_H_
OLDNEW
« no previous file with comments | « no previous file | src/interpreter/bytecodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698