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

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

Issue 1822043005: [Interpreter] Add ValidBytecodeOperandSizeCombinationsIterator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@move-hasbch-to-bytecodes
Patch Set: Rename class. Created 4 years, 8 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 523
524 private: 524 private:
525 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes); 525 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes);
526 }; 526 };
527 527
528 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); 528 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode);
529 std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale); 529 std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale);
530 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_size); 530 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_size);
531 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); 531 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type);
532 532
533 class ValidBytecodeOperandSizeCombinationsIterator final {
534 public:
535 ValidBytecodeOperandSizeCombinationsIterator();
536
537 void Advance();
538 bool done() { return reached_end_; }
539
540 OperandScale operand_scale() const { return operand_scale_; }
541 Bytecode bytecode() const { return bytecode_; }
542
543 private:
544 void IncrementPosition();
545 bool CurrentCombinationIsValid();
546
547 bool reached_end_;
548 OperandScale operand_scale_;
549 Bytecode bytecode_;
550
551 static const Bytecode kFirstBytecode = static_cast<Bytecode>(0);
552
553 DISALLOW_COPY_AND_ASSIGN(ValidBytecodeOperandSizeCombinationsIterator);
554 };
555
533 } // namespace interpreter 556 } // namespace interpreter
534 } // namespace internal 557 } // namespace internal
535 } // namespace v8 558 } // namespace v8
536 559
537 #endif // V8_INTERPRETER_BYTECODES_H_ 560 #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