forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeedback-vector.tq
More file actions
47 lines (41 loc) · 1.65 KB
/
Copy pathfeedback-vector.tq
File metadata and controls
47 lines (41 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// 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 uint16 {
tiering_in_progress: bool: 1 bit;
osr_tiering_in_progress: bool: 1 bit;
interrupt_budget_reset_by_ic_change: bool: 1 bit;
all_your_bits_are_belong_to_jgruber: uint32: 13 bit;
}
bitfield struct OsrState extends uint8 {
// The layout is chosen s.t. osr_urgency and
// maybe_has_(maglev|turbofan)_osr_code can be loaded with a single load
// (i.e. no masking required).
osr_urgency: uint32: 3 bit;
maybe_has_maglev_osr_code: bool: 1 bit;
maybe_has_turbofan_osr_code: bool: 1 bit;
// In order to have fast OSR checks in Ignition and Sparkplug, these bits
// should remain 0. That way, the OSR check can be implemented as a single
// comparison.
dont_use_these_bits_unless_beneficial: uint32: 3 bit;
}
@cppObjectLayoutDefinition
extern class ClosureFeedbackCellArray extends HeapObject {
const length: Smi;
objects[length]: FeedbackCell;
}
@generateBodyDescriptor
extern class FeedbackVector extends HeapObject {
const length: int32;
invocation_count: int32;
@if(TAGGED_SIZE_8_BYTES) optional_padding: uint32;
invocation_count_before_stable: uint8;
osr_state: OsrState;
flags: FeedbackVectorFlags;
shared_function_info: SharedFunctionInfo;
closure_feedback_cell_array: ClosureFeedbackCellArray;
parent_feedback_cell: FeedbackCell;
@cppRelaxedLoad @cppRelaxedStore raw_feedback_slots[length]: MaybeObject;
}
extern class FeedbackMetadata extends HeapObject;