forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-callbacks.tq
More file actions
64 lines (58 loc) · 2.28 KB
/
Copy pathapi-callbacks.tq
File metadata and controls
64 lines (58 loc) · 2.28 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// 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.
bitfield struct InterceptorInfoFlags extends uint31 {
can_intercept_symbols: bool: 1 bit;
non_masking: bool: 1 bit;
named: bool: 1 bit;
has_no_side_effect: bool: 1 bit;
has_new_callbacks_signature: bool: 1 bit;
}
extern class InterceptorInfo extends HeapObject {
data: Object;
flags: InterceptorInfoFlags;
@if(TAGGED_SIZE_8_BYTES) optional_padding: uint32;
@ifnot(TAGGED_SIZE_8_BYTES) optional_padding: void;
getter: ExternalPointer;
setter: ExternalPointer;
query: ExternalPointer;
descriptor: ExternalPointer;
deleter: ExternalPointer;
enumerator: ExternalPointer;
definer: ExternalPointer;
}
@cppObjectLayoutDefinition
extern class AccessCheckInfo extends Struct {
callback: Foreign|Zero|Undefined;
named_interceptor: InterceptorInfo|Zero|Undefined;
indexed_interceptor: InterceptorInfo|Zero|Undefined;
data: Object;
}
type SideEffectType extends int32 constexpr 'SideEffectType';
bitfield struct AccessorInfoFlags extends uint32 {
is_sloppy: bool: 1 bit;
replace_on_access: bool: 1 bit;
getter_side_effect_type: SideEffectType: 2 bit;
setter_side_effect_type: SideEffectType: 2 bit;
initial_attributes: PropertyAttributes: 3 bit;
}
extern class AccessorInfo extends HeapObject {
data: Object;
// This name is used for the two purposes:
// 1) for native accessor properties added to an object template via Api this
// field stores property name until the object template is instantiated,
// 2) CPU profiler machinery uses this name for mapping getter/setter
// C++ function pointers back to property name. Note that this mapping
// might be incorrect in case a getter/setter C++ callbacks are used for
// multiple different properties (for example, see
// Accessors::MakeModuleNamespaceEntryInfo).
name: Name;
// For simulator builds this field contains the address of the trampoline
// callable from generated code and for native builds - the address of
// the getter C function.
getter: ExternalPointer;
setter: ExternalPointer;
flags: AccessorInfoFlags;
@if(TAGGED_SIZE_8_BYTES) optional_padding: uint32;
@ifnot(TAGGED_SIZE_8_BYTES) optional_padding: void;
}