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 #include "src/objects/code-inl.h" 8 9 namespace v8 { 10 namespace internal { 11 namespace interpreter { 12 13 BytecodeArrayIterator::BytecodeArrayIterator( 14 Handle<BytecodeArray> bytecode_array) 15 : BytecodeArrayAccessor(bytecode_array, 0) {} 16 17 void BytecodeArrayIterator::Advance() { 18 SetOffset(current_offset() + current_bytecode_size()); 19 } 20 21 bool BytecodeArrayIterator::done() const { 22 return current_offset() >= bytecode_array()->length(); 23 } 24 25 } // namespace interpreter 26 } // namespace internal 27 } // namespace v8 28