Line data Source code
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 547030 : BytecodeArrayIterator::BytecodeArrayIterator(
14 : Handle<BytecodeArray> bytecode_array)
15 547030 : : BytecodeArrayAccessor(bytecode_array, 0) {}
16 :
17 16381237 : void BytecodeArrayIterator::Advance() {
18 16381237 : SetOffset(current_offset() + current_bytecode_size());
19 16381209 : }
20 :
21 16777893 : bool BytecodeArrayIterator::done() const {
22 33555782 : return current_offset() >= bytecode_array()->length();
23 : }
24 :
25 : } // namespace interpreter
26 : } // namespace internal
27 178779 : } // namespace v8
|