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 3 // found in the LICENSE file. 4 5 #include "src/interpreter/bytecode-array-iterator.h" 6 #include "src/objects-inl.h" 7 8 namespace v8 { 9 namespace internal { 10 namespace interpreter { 11 BytecodeArrayIterator(Handle<BytecodeArray> bytecode_array)12BytecodeArrayIterator::BytecodeArrayIterator( 13 Handle<BytecodeArray> bytecode_array) 14 : BytecodeArrayAccessor(bytecode_array, 0) {} 15 Advance()16void BytecodeArrayIterator::Advance() { 17 SetOffset(current_offset() + current_bytecode_size()); 18 } 19 done() const20bool BytecodeArrayIterator::done() const { 21 return current_offset() >= bytecode_array()->length(); 22 } 23 24 } // namespace interpreter 25 } // namespace internal 26 } // namespace v8 27