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_ITERATOR_H_ 6 #define V8_INTERPRETER_BYTECODE_ARRAY_ITERATOR_H_ 7 8 #include <memory> 9 10 #include "src/interpreter/bytecode-array-accessor.h" 11 12 namespace v8 { 13 namespace internal { 14 namespace interpreter { 15 16 class V8_EXPORT_PRIVATE BytecodeArrayIterator final 17 : public BytecodeArrayAccessor { 18 public: 19 explicit BytecodeArrayIterator(std::unique_ptr<AbstractBytecodeArray> array); 20 21 explicit BytecodeArrayIterator(Handle<BytecodeArray> array); 22 23 BytecodeArrayIterator(const BytecodeArrayIterator&) = delete; 24 BytecodeArrayIterator& operator=(const BytecodeArrayIterator&) = delete; 25 26 void Advance(); 27 bool done() const; 28 }; 29 30 } // namespace interpreter 31 } // namespace internal 32 } // namespace v8 33 34 #endif // V8_INTERPRETER_BYTECODE_ARRAY_ITERATOR_H_ 35