// Copyright 2019 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. type TieringState extends uint16 constexpr 'TieringState'; bitfield struct FeedbackVectorFlags extends uint32 { tiering_state: TieringState: 3 bit; // Whether the maybe_optimized_code field contains a code object. 'maybe', // because they flag may lag behind the actual state of the world (it will be // updated in time). maybe_has_optimized_code: bool: 1 bit; // Just one bit, since only {kNone,kInProgress} are relevant for OSR. osr_tiering_state: TieringState: 1 bit; all_your_bits_are_belong_to_jgruber: uint32: 27 bit; } @generateBodyDescriptor extern class FeedbackVector extends HeapObject { const length: int32; invocation_count: int32; profiler_ticks: int32; // TODO(turboprop, v8:11010): This field could be removed by changing the // tier up checks for Turboprop. If removing this field also check v8:9287. // Padding was necessary for GCMole. flags: FeedbackVectorFlags; shared_function_info: SharedFunctionInfo; closure_feedback_cell_array: ClosureFeedbackCellArray; @if(V8_EXTERNAL_CODE_SPACE) maybe_optimized_code: Weak; @ifnot(V8_EXTERNAL_CODE_SPACE) maybe_optimized_code: Weak; @cppRelaxedLoad raw_feedback_slots[length]: MaybeObject; } extern class FeedbackMetadata extends HeapObject;