OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_REVERSE_ITERATOR_H_ |
| 6 #define V8_INTERPRETER_BYTECODE_ARRAY_REVERSE_ITERATOR_H_ |
| 7 |
| 8 #include "src/interpreter/bytecode-array-accessor.h" |
| 9 #include "src/zone/zone-containers.h" |
| 10 #include "src/zone/zone.h" |
| 11 |
| 12 namespace v8 { |
| 13 namespace internal { |
| 14 namespace interpreter { |
| 15 |
| 16 class V8_EXPORT_PRIVATE BytecodeArrayReverseIterator final |
| 17 : public BytecodeArrayAccessor { |
| 18 public: |
| 19 explicit BytecodeArrayReverseIterator(Handle<BytecodeArray> bytecode_array, |
| 20 Zone* zone); |
| 21 |
| 22 void Advance(); |
| 23 void Reset(); |
| 24 bool done() const; |
| 25 |
| 26 private: |
| 27 ZoneVector<int> offsets_; |
| 28 ZoneVector<int>::const_reverse_iterator it_offsets_; |
| 29 |
| 30 void UpdateOffsetFromIterator(); |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayReverseIterator); |
| 33 }; |
| 34 |
| 35 } // namespace interpreter |
| 36 } // namespace internal |
| 37 } // namespace v8 |
| 38 |
| 39 #endif // V8_INTERPRETER_BYTECODE_ARRAY_REVERSE_ITERATOR_H_ |
OLD | NEW |