11cb0ef41Sopenharmony_ci// Copyright 2019 the V8 project authors. All rights reserved.
21cb0ef41Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be
31cb0ef41Sopenharmony_ci// found in the LICENSE file.
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_citype TieringState extends uint16 constexpr 'TieringState';
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_cibitfield struct FeedbackVectorFlags extends uint32 {
81cb0ef41Sopenharmony_ci  tiering_state: TieringState: 3 bit;
91cb0ef41Sopenharmony_ci  // Whether the maybe_optimized_code field contains a code object. 'maybe',
101cb0ef41Sopenharmony_ci  // because they flag may lag behind the actual state of the world (it will be
111cb0ef41Sopenharmony_ci  // updated in time).
121cb0ef41Sopenharmony_ci  maybe_has_optimized_code: bool: 1 bit;
131cb0ef41Sopenharmony_ci  // Just one bit, since only {kNone,kInProgress} are relevant for OSR.
141cb0ef41Sopenharmony_ci  osr_tiering_state: TieringState: 1 bit;
151cb0ef41Sopenharmony_ci  all_your_bits_are_belong_to_jgruber: uint32: 27 bit;
161cb0ef41Sopenharmony_ci}
171cb0ef41Sopenharmony_ci
181cb0ef41Sopenharmony_ci@generateBodyDescriptor
191cb0ef41Sopenharmony_ciextern class FeedbackVector extends HeapObject {
201cb0ef41Sopenharmony_ci  const length: int32;
211cb0ef41Sopenharmony_ci  invocation_count: int32;
221cb0ef41Sopenharmony_ci  profiler_ticks: int32;
231cb0ef41Sopenharmony_ci  // TODO(turboprop, v8:11010): This field could be removed by changing the
241cb0ef41Sopenharmony_ci  // tier up checks for Turboprop. If removing this field also check v8:9287.
251cb0ef41Sopenharmony_ci  // Padding was necessary for GCMole.
261cb0ef41Sopenharmony_ci  flags: FeedbackVectorFlags;
271cb0ef41Sopenharmony_ci  shared_function_info: SharedFunctionInfo;
281cb0ef41Sopenharmony_ci  closure_feedback_cell_array: ClosureFeedbackCellArray;
291cb0ef41Sopenharmony_ci  @if(V8_EXTERNAL_CODE_SPACE) maybe_optimized_code: Weak<CodeDataContainer>;
301cb0ef41Sopenharmony_ci  @ifnot(V8_EXTERNAL_CODE_SPACE) maybe_optimized_code: Weak<Code>;
311cb0ef41Sopenharmony_ci  @cppRelaxedLoad raw_feedback_slots[length]: MaybeObject;
321cb0ef41Sopenharmony_ci}
331cb0ef41Sopenharmony_ci
341cb0ef41Sopenharmony_ciextern class FeedbackMetadata extends HeapObject;
35