1// Copyright 2019 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
5type DependentCode extends WeakFixedArray;
6
7bitfield struct OSRUrgencyAndInstallTarget extends uint16 {
8  // The layout is chosen s.t. urgency and the install target offset can be
9  // loaded with a single 16-bit load (i.e. no masking required).
10  osr_urgency: uint32: 3 bit;
11  // The 13 LSB of the install target bytecode offset.
12  osr_install_target: uint32: 13 bit;
13}
14
15extern class BytecodeArray extends FixedArrayBase {
16  // TODO(v8:8983): bytecode array object sizes vary based on their contents.
17  constant_pool: FixedArray;
18  // The handler table contains offsets of exception handlers.
19  handler_table: ByteArray;
20  // Source position table. Can contain:
21  // * undefined (initial value)
22  // * empty_byte_array (for bytecode generated for functions that will never
23  // have source positions, e.g. native functions).
24  // * ByteArray (when source positions have been collected for the bytecode)
25  // * exception (when an error occurred while explicitly collecting source
26  // positions for pre-existing bytecode).
27  @cppAcquireLoad
28  @cppReleaseStore
29  source_position_table: Undefined|ByteArray|Exception;
30  frame_size: int32;
31  parameter_size: int32;
32  incoming_new_target_or_generator_register: int32;
33  osr_urgency_and_install_target: OSRUrgencyAndInstallTarget;
34  bytecode_age: uint16;  // Only 3 bits used.
35}
36
37extern class CodeDataContainer extends HeapObject;
38