Flutter Engine
The Flutter Engine
third_party
dart-lang
sdk
runtime
vm
compiler
runtime_offsets_list.h
Go to the documentation of this file.
1
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
2
// for details. All rights reserved. Use of this source code is governed by a
3
// BSD-style license that can be found in the LICENSE file.
4
5
#ifndef RUNTIME_VM_COMPILER_RUNTIME_OFFSETS_LIST_H_
6
#define RUNTIME_VM_COMPILER_RUNTIME_OFFSETS_LIST_H_
7
8
// Macro list of all constants that differ based on whether the architecture is
9
// 32-bit or 64-bit. They are used to allow the target architecture to differ
10
// from the host, like this:
11
// 1) The macros correspond to constants defined throughout the VM that are
12
// sized based on the *host* architecture.
13
// 2) offsets_extractor.cc prints these values to runtime_offsets_extracted.h,
14
// for both 32 and 64 bit architectures.
15
// 3) runtime_api.h presents the runtime_offsets_extracted.h constants in a way
16
// designed to look like the original constants from 1), but now namespaced
17
// to dart::compiler::target, and sized based on the *target* architecture.
18
// 4) Users of the constants from 1) can now just add the namespace from 3) to
19
// get all their constants sized based on the target rather than the host.
20
21
// FIELD(Class, Name) Offset of a field within a class.
22
// ARRAY(Class, Name) Offset of the first element and the size of the elements
23
// in an array of this class.
24
// SIZEOF(Class, Name, What) Class::Name() is defined as sizeof(What).
25
// ARRAY_SIZEOF(Class, Name, ElementOffset) Instance size for an array object.
26
// Defines Class::Name(intptr_t length) and uses
27
// Class::ElementOffset(length) to calculate size of the instance. Also
28
// defines Class::Name() (with no length argument) to be 0.
29
// PAYLOAD_SIZEOF(Class, Name, HeaderSize) Instance size for a payload object.
30
// Defines Class::Name(word payload_size) and uses Class::HeaderSize(),
31
// which should give the size of the header before the payload. Also
32
// defines Class::Name() (with no payload size argument) to be 0.
33
// RANGE(Class, Name, Type, First, Last, Filter) An array of offsets generated
34
// by passing a value of the given Type in the range from First to Last to
35
// Class::Name() if Filter returns true for that value.
36
// CONSTANT(Class, Name) Miscellaneous constant.
37
//
38
// COMMON_OFFSETS_LIST is for declarations that are valid in all contexts.
39
// JIT_OFFSETS_LIST is for declarations that are only valid in JIT mode.
40
// AOT_OFFSETS_LIST is for declarations that are only valid in AOT mode.
41
// A declaration that is not valid in product mode can be wrapped with
42
// NOT_IN_PRODUCT().
43
//
44
// TODO(dartbug.com/43646): Add DART_PRECOMPILER as another axis.
45
46
#if defined(DART_COMPRESSED_POINTERS)
47
#define COMPRESSED_ONLY(x) x
48
#else
49
#define COMPRESSED_ONLY(x)
50
#endif
51
52
#define COMMON_OFFSETS_LIST(FIELD, ARRAY, SIZEOF, ARRAY_SIZEOF, \
53
PAYLOAD_SIZEOF, RANGE, CONSTANT) \
54
ARRAY(Array, element_offset) \
55
NOT_IN_PRODUCT(ARRAY(ClassTable, AllocationTracingStateSlotOffsetFor)) \
56
ARRAY(Code, element_offset) \
57
ARRAY(Context, variable_offset) \
58
ARRAY(ContextScope, element_offset) \
59
ARRAY(ExceptionHandlers, element_offset) \
60
ARRAY(ObjectPool, element_offset) \
61
ARRAY(OneByteString, element_offset) \
62
ARRAY(Record, field_offset) \
63
ARRAY(TypeArguments, type_at_offset) \
64
ARRAY(TwoByteString, element_offset) \
65
ARRAY(WeakArray, element_offset) \
66
ARRAY_SIZEOF(Array, InstanceSize, element_offset) \
67
ARRAY_SIZEOF(Code, InstanceSize, element_offset) \
68
ARRAY_SIZEOF(Context, InstanceSize, variable_offset) \
69
ARRAY_SIZEOF(ContextScope, InstanceSize, element_offset) \
70
ARRAY_SIZEOF(ExceptionHandlers, InstanceSize, element_offset) \
71
ARRAY_SIZEOF(ObjectPool, InstanceSize, element_offset) \
72
ARRAY_SIZEOF(OneByteString, InstanceSize, element_offset) \
73
ARRAY_SIZEOF(Record, InstanceSize, field_offset) \
74
ARRAY_SIZEOF(TypeArguments, InstanceSize, type_at_offset) \
75
ARRAY_SIZEOF(TwoByteString, InstanceSize, element_offset) \
76
ARRAY_SIZEOF(WeakArray, InstanceSize, element_offset) \
77
CONSTANT(Array, kMaxElements) \
78
CONSTANT(Array, kMaxNewSpaceElements) \
79
CONSTANT(Context, kMaxElements) \
80
CONSTANT(Instructions, kMonomorphicEntryOffsetJIT) \
81
CONSTANT(Instructions, kPolymorphicEntryOffsetJIT) \
82
CONSTANT(Instructions, kMonomorphicEntryOffsetAOT) \
83
CONSTANT(Instructions, kPolymorphicEntryOffsetAOT) \
84
CONSTANT(Instructions, kBarePayloadAlignment) \
85
CONSTANT(Instructions, kNonBarePayloadAlignment) \
86
CONSTANT(NativeEntry, kNumCallWrapperArguments) \
87
CONSTANT(Page, kBytesPerCardLog2) \
88
CONSTANT(Record, kMaxElements) \
89
CONSTANT(RecordShape, kFieldNamesIndexMask) \
90
CONSTANT(RecordShape, kFieldNamesIndexShift) \
91
CONSTANT(RecordShape, kMaxFieldNamesIndex) \
92
CONSTANT(RecordShape, kMaxNumFields) \
93
CONSTANT(RecordShape, kNumFieldsMask) \
94
CONSTANT(String, kMaxElements) \
95
CONSTANT(OneByteString, kMaxNewSpaceElements) \
96
CONSTANT(TwoByteString, kMaxNewSpaceElements) \
97
CONSTANT(SubtypeTestCache, kFunctionTypeArguments) \
98
CONSTANT(SubtypeTestCache, kInstanceCidOrSignature) \
99
CONSTANT(SubtypeTestCache, kDestinationType) \
100
CONSTANT(SubtypeTestCache, kInstanceDelayedFunctionTypeArguments) \
101
CONSTANT(SubtypeTestCache, kInstanceParentFunctionTypeArguments) \
102
CONSTANT(SubtypeTestCache, kInstanceTypeArguments) \
103
CONSTANT(SubtypeTestCache, kInstantiatorTypeArguments) \
104
CONSTANT(SubtypeTestCache, kTestEntryLength) \
105
CONSTANT(SubtypeTestCache, kMaxInputs) \
106
CONSTANT(SubtypeTestCache, kTestResult) \
107
CONSTANT(TypeArguments, kMaxElements) \
108
FIELD(AbstractType, flags_offset) \
109
FIELD(AbstractType, hash_offset) \
110
FIELD(AbstractType, type_test_stub_entry_point_offset) \
111
FIELD(ArgumentsDescriptor, count_offset) \
112
FIELD(ArgumentsDescriptor, size_offset) \
113
FIELD(ArgumentsDescriptor, first_named_entry_offset) \
114
FIELD(ArgumentsDescriptor, named_entry_size) \
115
FIELD(ArgumentsDescriptor, name_offset) \
116
FIELD(ArgumentsDescriptor, position_offset) \
117
FIELD(ArgumentsDescriptor, positional_count_offset) \
118
FIELD(ArgumentsDescriptor, type_args_len_offset) \
119
FIELD(Array, data_offset) \
120
FIELD(Array, length_offset) \
121
FIELD(Array, tags_offset) \
122
FIELD(Array, type_arguments_offset) \
123
FIELD(Class, declaration_type_offset) \
124
FIELD(Class, num_type_arguments_offset) \
125
FIELD(Class, super_type_offset) \
126
FIELD(Class, host_type_arguments_field_offset_in_words_offset) \
127
NOT_IN_PRODUCT(FIELD(ClassTable, allocation_tracing_state_table_offset)) \
128
FIELD(Closure, context_offset) \
129
FIELD(Closure, delayed_type_arguments_offset) \
130
FIELD(Closure, function_offset) \
131
FIELD(Closure, function_type_arguments_offset) \
132
FIELD(Closure, hash_offset) \
133
FIELD(Closure, instantiator_type_arguments_offset) \
134
FIELD(ClosureData, packed_fields_offset) \
135
FIELD(Code, instructions_offset) \
136
FIELD(Code, object_pool_offset) \
137
FIELD(Code, owner_offset) \
138
FIELD(Context, num_variables_offset) \
139
FIELD(Context, parent_offset) \
140
FIELD(Double, value_offset) \
141
FIELD(Float32x4, value_offset) \
142
FIELD(Float64x2, value_offset) \
143
FIELD(Field, initializer_function_offset) \
144
FIELD(Field, host_offset_or_field_id_offset) \
145
FIELD(Field, guarded_cid_offset) \
146
FIELD(Field, guarded_list_length_in_object_offset_offset) \
147
FIELD(Field, guarded_list_length_offset) \
148
FIELD(Field, is_nullable_offset) \
149
FIELD(Field, kind_bits_offset) \
150
FIELD(Function, code_offset) \
151
FIELD(Function, data_offset) \
152
RANGE(Function, entry_point_offset, CodeEntryKind, CodeEntryKind::kNormal, \
153
CodeEntryKind::kUnchecked, [](CodeEntryKind value) { return true; }) \
154
FIELD(Function, kind_tag_offset) \
155
FIELD(Function, signature_offset) \
156
FIELD(FutureOr, type_arguments_offset) \
157
FIELD(GrowableObjectArray, data_offset) \
158
FIELD(GrowableObjectArray, length_offset) \
159
FIELD(GrowableObjectArray, type_arguments_offset) \
160
FIELD(Page, card_table_offset) \
161
FIELD(Page, original_top_offset) \
162
FIELD(Page, original_end_offset) \
163
FIELD(CallSiteData, arguments_descriptor_offset) \
164
FIELD(ICData, NumArgsTestedMask) \
165
FIELD(ICData, NumArgsTestedShift) \
166
FIELD(ICData, entries_offset) \
167
FIELD(ICData, owner_offset) \
168
FIELD(ICData, state_bits_offset) \
169
FIELD(Int32x4, value_offset) \
170
FIELD(Isolate, current_tag_offset) \
171
FIELD(Isolate, default_tag_offset) \
172
FIELD(Isolate, finalizers_offset) \
173
NOT_IN_PRODUCT(FIELD(Isolate, has_resumption_breakpoints_offset)) \
174
FIELD(IsolateGroup, object_store_offset) \
175
FIELD(IsolateGroup, class_table_offset) \
176
FIELD(IsolateGroup, cached_class_table_table_offset) \
177
NOT_IN_PRODUCT(FIELD(Isolate, single_step_offset)) \
178
FIELD(Isolate, user_tag_offset) \
179
FIELD(LinkedHashBase, data_offset) \
180
FIELD(ImmutableLinkedHashBase, data_offset) \
181
FIELD(LinkedHashBase, deleted_keys_offset) \
182
FIELD(LinkedHashBase, hash_mask_offset) \
183
FIELD(LinkedHashBase, index_offset) \
184
FIELD(LinkedHashBase, type_arguments_offset) \
185
FIELD(LinkedHashBase, used_data_offset) \
186
FIELD(LocalHandle, ptr_offset) \
187
FIELD(MarkingStackBlock, pointers_offset) \
188
FIELD(MarkingStackBlock, top_offset) \
189
FIELD(MegamorphicCache, buckets_offset) \
190
FIELD(MegamorphicCache, mask_offset) \
191
FIELD(Mint, value_offset) \
192
FIELD(NativeArguments, argc_tag_offset) \
193
FIELD(NativeArguments, argv_offset) \
194
FIELD(NativeArguments, retval_offset) \
195
FIELD(NativeArguments, thread_offset) \
196
FIELD(ObjectStore, double_type_offset) \
197
FIELD(ObjectStore, int_type_offset) \
198
FIELD(ObjectStore, record_field_names_offset) \
199
FIELD(ObjectStore, string_type_offset) \
200
FIELD(ObjectStore, type_type_offset) \
201
FIELD(ObjectStore, ffi_callback_code_offset) \
202
FIELD(ObjectStore, suspend_state_await_offset) \
203
FIELD(ObjectStore, suspend_state_await_with_type_check_offset) \
204
FIELD(ObjectStore, suspend_state_handle_exception_offset) \
205
FIELD(ObjectStore, suspend_state_init_async_offset) \
206
FIELD(ObjectStore, suspend_state_init_async_star_offset) \
207
FIELD(ObjectStore, suspend_state_init_sync_star_offset) \
208
FIELD(ObjectStore, suspend_state_return_async_offset) \
209
FIELD(ObjectStore, suspend_state_return_async_not_future_offset) \
210
FIELD(ObjectStore, suspend_state_return_async_star_offset) \
211
FIELD(ObjectStore, suspend_state_suspend_sync_star_at_start_offset) \
212
FIELD(ObjectStore, suspend_state_yield_async_star_offset) \
213
FIELD(OneByteString, data_offset) \
214
FIELD(PersistentHandle, ptr_offset) \
215
FIELD(PointerBase, data_offset) \
216
FIELD(Pointer, type_arguments_offset) \
217
FIELD(ReceivePort, send_port_offset) \
218
FIELD(ReceivePort, handler_offset) \
219
FIELD(Record, shape_offset) \
220
FIELD(SingleTargetCache, entry_point_offset) \
221
FIELD(SingleTargetCache, lower_limit_offset) \
222
FIELD(SingleTargetCache, target_offset) \
223
FIELD(SingleTargetCache, upper_limit_offset) \
224
FIELD(StoreBufferBlock, pointers_offset) \
225
FIELD(StoreBufferBlock, top_offset) \
226
FIELD(StreamInfo, enabled_offset) \
227
FIELD(String, hash_offset) \
228
FIELD(String, length_offset) \
229
FIELD(SubtypeTestCache, cache_offset) \
230
FIELD(SubtypeTestCache, num_inputs_offset) \
231
FIELD(SuspendState, FrameSizeGrowthGap) \
232
FIELD(SuspendState, error_callback_offset) \
233
FIELD(SuspendState, frame_size_offset) \
234
FIELD(SuspendState, function_data_offset) \
235
FIELD(SuspendState, payload_offset) \
236
FIELD(SuspendState, pc_offset) \
237
FIELD(SuspendState, then_callback_offset) \
238
FIELD(Thread, AllocateArray_entry_point_offset) \
239
FIELD(Thread, active_exception_offset) \
240
FIELD(Thread, active_stacktrace_offset) \
241
FIELD(Thread, array_write_barrier_entry_point_offset) \
242
FIELD(Thread, allocate_mint_with_fpu_regs_entry_point_offset) \
243
FIELD(Thread, allocate_mint_with_fpu_regs_stub_offset) \
244
FIELD(Thread, allocate_mint_without_fpu_regs_entry_point_offset) \
245
FIELD(Thread, allocate_mint_without_fpu_regs_stub_offset) \
246
FIELD(Thread, allocate_object_entry_point_offset) \
247
FIELD(Thread, allocate_object_stub_offset) \
248
FIELD(Thread, allocate_object_parameterized_entry_point_offset) \
249
FIELD(Thread, allocate_object_parameterized_stub_offset) \
250
FIELD(Thread, allocate_object_slow_entry_point_offset) \
251
FIELD(Thread, allocate_object_slow_stub_offset) \
252
FIELD(Thread, api_top_scope_offset) \
253
FIELD(Thread, async_exception_handler_stub_offset) \
254
FIELD(Thread, auto_scope_native_wrapper_entry_point_offset) \
255
FIELD(Thread, bool_false_offset) \
256
FIELD(Thread, bool_true_offset) \
257
FIELD(Thread, bootstrap_native_wrapper_entry_point_offset) \
258
FIELD(Thread, call_to_runtime_entry_point_offset) \
259
FIELD(Thread, call_to_runtime_stub_offset) \
260
FIELD(Thread, dart_stream_offset) \
261
FIELD(Thread, dispatch_table_array_offset) \
262
FIELD(Thread, double_truncate_round_supported_offset) \
263
FIELD(Thread, service_extension_stream_offset) \
264
FIELD(Thread, optimize_entry_offset) \
265
FIELD(Thread, optimize_stub_offset) \
266
FIELD(Thread, deoptimize_entry_offset) \
267
FIELD(Thread, deoptimize_stub_offset) \
268
FIELD(Thread, double_abs_address_offset) \
269
FIELD(Thread, double_negate_address_offset) \
270
FIELD(Thread, end_offset) \
271
FIELD(Thread, enter_safepoint_stub_offset) \
272
FIELD(Thread, execution_state_offset) \
273
FIELD(Thread, exit_safepoint_stub_offset) \
274
FIELD(Thread, exit_safepoint_ignore_unwind_in_progress_stub_offset) \
275
FIELD(Thread, call_native_through_safepoint_stub_offset) \
276
FIELD(Thread, call_native_through_safepoint_entry_point_offset) \
277
FIELD(Thread, fix_allocation_stub_code_offset) \
278
FIELD(Thread, fix_callers_target_code_offset) \
279
FIELD(Thread, float_absolute_address_offset) \
280
FIELD(Thread, float_negate_address_offset) \
281
FIELD(Thread, float_not_address_offset) \
282
FIELD(Thread, float_zerow_address_offset) \
283
FIELD(Thread, global_object_pool_offset) \
284
FIELD(Thread, invoke_dart_code_stub_offset) \
285
FIELD(Thread, exit_through_ffi_offset) \
286
FIELD(Thread, isolate_offset) \
287
FIELD(Thread, isolate_group_offset) \
288
FIELD(Thread, field_table_values_offset) \
289
FIELD(Thread, lazy_deopt_from_return_stub_offset) \
290
FIELD(Thread, lazy_deopt_from_throw_stub_offset) \
291
FIELD(Thread, lazy_specialize_type_test_stub_offset) \
292
FIELD(Thread, old_marking_stack_block_offset) \
293
FIELD(Thread, new_marking_stack_block_offset) \
294
FIELD(Thread, megamorphic_call_checked_entry_offset) \
295
FIELD(Thread, switchable_call_miss_entry_offset) \
296
FIELD(Thread, switchable_call_miss_stub_offset) \
297
FIELD(Thread, no_scope_native_wrapper_entry_point_offset) \
298
FIELD(Thread, late_initialization_error_shared_with_fpu_regs_stub_offset) \
299
FIELD(Thread, late_initialization_error_shared_without_fpu_regs_stub_offset) \
300
FIELD(Thread, null_error_shared_with_fpu_regs_stub_offset) \
301
FIELD(Thread, null_error_shared_without_fpu_regs_stub_offset) \
302
FIELD(Thread, null_arg_error_shared_with_fpu_regs_stub_offset) \
303
FIELD(Thread, null_arg_error_shared_without_fpu_regs_stub_offset) \
304
FIELD(Thread, null_cast_error_shared_with_fpu_regs_stub_offset) \
305
FIELD(Thread, null_cast_error_shared_without_fpu_regs_stub_offset) \
306
FIELD(Thread, range_error_shared_with_fpu_regs_stub_offset) \
307
FIELD(Thread, range_error_shared_without_fpu_regs_stub_offset) \
308
FIELD(Thread, write_error_shared_with_fpu_regs_stub_offset) \
309
FIELD(Thread, write_error_shared_without_fpu_regs_stub_offset) \
310
FIELD(Thread, resume_stub_offset) \
311
FIELD(Thread, return_async_not_future_stub_offset) \
312
FIELD(Thread, return_async_star_stub_offset) \
313
FIELD(Thread, return_async_stub_offset) \
314
FIELD(Thread, object_null_offset) \
315
FIELD(Thread, predefined_symbols_address_offset) \
316
FIELD(Thread, resume_pc_offset) \
317
FIELD(Thread, saved_shadow_call_stack_offset) \
318
FIELD(Thread, safepoint_state_offset) \
319
FIELD(Thread, shared_field_table_values_offset) \
320
FIELD(Thread, slow_type_test_stub_offset) \
321
FIELD(Thread, slow_type_test_entry_point_offset) \
322
FIELD(Thread, stack_limit_offset) \
323
FIELD(Thread, saved_stack_limit_offset) \
324
FIELD(Thread, stack_overflow_flags_offset) \
325
FIELD(Thread, stack_overflow_shared_with_fpu_regs_entry_point_offset) \
326
FIELD(Thread, stack_overflow_shared_with_fpu_regs_stub_offset) \
327
FIELD(Thread, stack_overflow_shared_without_fpu_regs_entry_point_offset) \
328
FIELD(Thread, stack_overflow_shared_without_fpu_regs_stub_offset) \
329
FIELD(Thread, store_buffer_block_offset) \
330
FIELD(Thread, suspend_state_await_entry_point_offset) \
331
FIELD(Thread, suspend_state_await_with_type_check_entry_point_offset) \
332
FIELD(Thread, suspend_state_init_async_entry_point_offset) \
333
FIELD(Thread, suspend_state_return_async_entry_point_offset) \
334
FIELD(Thread, suspend_state_return_async_not_future_entry_point_offset) \
335
FIELD(Thread, suspend_state_init_async_star_entry_point_offset) \
336
FIELD(Thread, suspend_state_yield_async_star_entry_point_offset) \
337
FIELD(Thread, suspend_state_return_async_star_entry_point_offset) \
338
FIELD(Thread, suspend_state_init_sync_star_entry_point_offset) \
339
FIELD(Thread, suspend_state_suspend_sync_star_at_start_entry_point_offset) \
340
FIELD(Thread, suspend_state_handle_exception_entry_point_offset) \
341
FIELD(Thread, top_exit_frame_info_offset) \
342
FIELD(Thread, top_offset) \
343
FIELD(Thread, top_resource_offset) \
344
FIELD(Thread, unboxed_runtime_arg_offset) \
345
FIELD(Thread, vm_tag_offset) \
346
FIELD(Thread, write_barrier_entry_point_offset) \
347
FIELD(Thread, write_barrier_mask_offset) \
348
COMPRESSED_ONLY(FIELD(Thread, heap_base_offset)) \
349
FIELD(Thread, next_task_id_offset) \
350
FIELD(Thread, random_offset) \
351
FIELD(Thread, jump_to_frame_entry_point_offset) \
352
FIELD(Thread, tsan_utils_offset) \
353
FIELD(TsanUtils, setjmp_function_offset) \
354
FIELD(TsanUtils, setjmp_buffer_offset) \
355
FIELD(TsanUtils, exception_pc_offset) \
356
FIELD(TsanUtils, exception_sp_offset) \
357
FIELD(TsanUtils, exception_fp_offset) \
358
FIELD(TimelineStream, enabled_offset) \
359
FIELD(TwoByteString, data_offset) \
360
FIELD(Type, arguments_offset) \
361
FIELD(Finalizer, type_arguments_offset) \
362
FIELD(Finalizer, callback_offset) \
363
FIELD(FinalizerBase, all_entries_offset) \
364
FIELD(FinalizerBase, detachments_offset) \
365
FIELD(FinalizerBase, entries_collected_offset) \
366
FIELD(FinalizerBase, isolate_offset) \
367
FIELD(FinalizerEntry, detach_offset) \
368
FIELD(FinalizerEntry, external_size_offset) \
369
FIELD(FinalizerEntry, finalizer_offset) \
370
FIELD(FinalizerEntry, next_offset) \
371
FIELD(FinalizerEntry, token_offset) \
372
FIELD(FinalizerEntry, value_offset) \
373
FIELD(NativeFinalizer, callback_offset) \
374
FIELD(FunctionType, named_parameter_names_offset) \
375
FIELD(FunctionType, packed_parameter_counts_offset) \
376
FIELD(FunctionType, packed_type_parameter_counts_offset) \
377
FIELD(FunctionType, parameter_types_offset) \
378
FIELD(FunctionType, type_parameters_offset) \
379
FIELD(TypeParameter, index_offset) \
380
FIELD(TypeArguments, hash_offset) \
381
FIELD(TypeArguments, instantiations_offset) \
382
FIELD(TypeArguments, length_offset) \
383
FIELD(TypeArguments, nullability_offset) \
384
FIELD(TypeArguments, types_offset) \
385
FIELD(TypeParameters, names_offset) \
386
FIELD(TypeParameters, flags_offset) \
387
FIELD(TypeParameters, bounds_offset) \
388
FIELD(TypeParameters, defaults_offset) \
389
FIELD(TypedDataBase, length_offset) \
390
FIELD(TypedDataView, typed_data_offset) \
391
FIELD(TypedDataView, offset_in_bytes_offset) \
392
FIELD(TypedData, payload_offset) \
393
FIELD(UnhandledException, exception_offset) \
394
FIELD(UnhandledException, stacktrace_offset) \
395
FIELD(UserTag, tag_offset) \
396
FIELD(MonomorphicSmiableCall, expected_cid_offset) \
397
FIELD(MonomorphicSmiableCall, entrypoint_offset) \
398
FIELD(WeakProperty, key_offset) \
399
FIELD(WeakProperty, value_offset) \
400
FIELD(WeakReference, target_offset) \
401
FIELD(WeakReference, type_arguments_offset) \
402
RANGE(Code, entry_point_offset, CodeEntryKind, CodeEntryKind::kNormal, \
403
CodeEntryKind::kMonomorphicUnchecked, \
404
[](CodeEntryKind value) { return true; }) \
405
RANGE(Thread, write_barrier_wrappers_thread_offset, Register, 0, \
406
kNumberOfCpuRegisters - 1, [](Register reg) { \
407
return (kDartAvailableCpuRegs & (1 << reg)) != 0; \
408
}) \
409
SIZEOF(AbstractType, InstanceSize, UntaggedAbstractType) \
410
SIZEOF(ApiError, InstanceSize, UntaggedApiError) \
411
SIZEOF(Array, header_size, UntaggedArray) \
412
SIZEOF(Bool, InstanceSize, UntaggedBool) \
413
SIZEOF(Capability, InstanceSize, UntaggedCapability) \
414
SIZEOF(Class, InstanceSize, UntaggedClass) \
415
SIZEOF(Closure, InstanceSize, UntaggedClosure) \
416
SIZEOF(ClosureData, InstanceSize, UntaggedClosureData) \
417
SIZEOF(CodeSourceMap, HeaderSize, UntaggedCodeSourceMap) \
418
SIZEOF(CompressedStackMaps, ObjectHeaderSize, UntaggedCompressedStackMaps) \
419
SIZEOF(CompressedStackMaps, PayloadHeaderSize, \
420
UntaggedCompressedStackMaps::Payload::FlagsAndSizeHeader) \
421
SIZEOF(Context, header_size, UntaggedContext) \
422
SIZEOF(Double, InstanceSize, UntaggedDouble) \
423
SIZEOF(DynamicLibrary, InstanceSize, UntaggedDynamicLibrary) \
424
SIZEOF(ExternalTypedData, InstanceSize, UntaggedExternalTypedData) \
425
SIZEOF(FfiTrampolineData, InstanceSize, UntaggedFfiTrampolineData) \
426
SIZEOF(Field, InstanceSize, UntaggedField) \
427
SIZEOF(Finalizer, InstanceSize, UntaggedFinalizer) \
428
SIZEOF(FinalizerEntry, InstanceSize, UntaggedFinalizerEntry) \
429
SIZEOF(NativeFinalizer, InstanceSize, UntaggedNativeFinalizer) \
430
SIZEOF(Float32x4, InstanceSize, UntaggedFloat32x4) \
431
SIZEOF(Float64x2, InstanceSize, UntaggedFloat64x2) \
432
SIZEOF(Function, InstanceSize, UntaggedFunction) \
433
SIZEOF(FunctionType, InstanceSize, UntaggedFunctionType) \
434
SIZEOF(FutureOr, InstanceSize, UntaggedFutureOr) \
435
SIZEOF(GrowableObjectArray, InstanceSize, UntaggedGrowableObjectArray) \
436
SIZEOF(ICData, InstanceSize, UntaggedICData) \
437
SIZEOF(Instance, InstanceSize, UntaggedInstance) \
438
SIZEOF(Instructions, UnalignedHeaderSize, UntaggedInstructions) \
439
SIZEOF(InstructionsSection, UnalignedHeaderSize, \
440
UntaggedInstructionsSection) \
441
FIELD(InstructionsSection, HeaderSize) \
442
SIZEOF(InstructionsTable, InstanceSize, UntaggedInstructionsTable) \
443
SIZEOF(Int32x4, InstanceSize, UntaggedInt32x4) \
444
SIZEOF(Integer, InstanceSize, UntaggedInteger) \
445
SIZEOF(KernelProgramInfo, InstanceSize, UntaggedKernelProgramInfo) \
446
SIZEOF(LanguageError, InstanceSize, UntaggedLanguageError) \
447
SIZEOF(Library, InstanceSize, UntaggedLibrary) \
448
SIZEOF(LibraryPrefix, InstanceSize, UntaggedLibraryPrefix) \
449
SIZEOF(LinkedHashBase, InstanceSize, UntaggedLinkedHashBase) \
450
SIZEOF(LocalHandle, InstanceSize, LocalHandle) \
451
SIZEOF(MegamorphicCache, InstanceSize, UntaggedMegamorphicCache) \
452
SIZEOF(Mint, InstanceSize, UntaggedMint) \
453
SIZEOF(MirrorReference, InstanceSize, UntaggedMirrorReference) \
454
SIZEOF(MonomorphicSmiableCall, InstanceSize, UntaggedMonomorphicSmiableCall) \
455
SIZEOF(Namespace, InstanceSize, UntaggedNamespace) \
456
SIZEOF(NativeArguments, StructSize, NativeArguments) \
457
SIZEOF(Number, InstanceSize, UntaggedNumber) \
458
SIZEOF(Object, InstanceSize, UntaggedObject) \
459
SIZEOF(PatchClass, InstanceSize, UntaggedPatchClass) \
460
SIZEOF(PcDescriptors, HeaderSize, UntaggedPcDescriptors) \
461
SIZEOF(Pointer, InstanceSize, UntaggedPointer) \
462
SIZEOF(ReceivePort, InstanceSize, UntaggedReceivePort) \
463
SIZEOF(RecordType, InstanceSize, UntaggedRecordType) \
464
SIZEOF(RegExp, InstanceSize, UntaggedRegExp) \
465
SIZEOF(Script, InstanceSize, UntaggedScript) \
466
SIZEOF(SendPort, InstanceSize, UntaggedSendPort) \
467
SIZEOF(Sentinel, InstanceSize, UntaggedSentinel) \
468
SIZEOF(SingleTargetCache, InstanceSize, UntaggedSingleTargetCache) \
469
SIZEOF(StackTrace, InstanceSize, UntaggedStackTrace) \
470
SIZEOF(SuspendState, HeaderSize, UntaggedSuspendState) \
471
SIZEOF(String, InstanceSize, UntaggedString) \
472
SIZEOF(SubtypeTestCache, InstanceSize, UntaggedSubtypeTestCache) \
473
SIZEOF(LoadingUnit, InstanceSize, UntaggedLoadingUnit) \
474
SIZEOF(TransferableTypedData, InstanceSize, UntaggedTransferableTypedData) \
475
SIZEOF(Type, InstanceSize, UntaggedType) \
476
SIZEOF(TypeParameter, InstanceSize, UntaggedTypeParameter) \
477
SIZEOF(TypeParameters, InstanceSize, UntaggedTypeParameters) \
478
SIZEOF(TypedData, HeaderSize, UntaggedTypedData) \
479
SIZEOF(TypedDataBase, InstanceSize, UntaggedTypedDataBase) \
480
SIZEOF(TypedDataView, InstanceSize, UntaggedTypedDataView) \
481
SIZEOF(UnhandledException, InstanceSize, UntaggedUnhandledException) \
482
SIZEOF(UnlinkedCall, InstanceSize, UntaggedUnlinkedCall) \
483
SIZEOF(UnwindError, InstanceSize, UntaggedUnwindError) \
484
SIZEOF(UserTag, InstanceSize, UntaggedUserTag) \
485
SIZEOF(WeakProperty, InstanceSize, UntaggedWeakProperty) \
486
SIZEOF(WeakReference, InstanceSize, UntaggedWeakReference) \
487
SIZEOF(WeakSerializationReference, InstanceSize, \
488
UntaggedWeakSerializationReference) \
489
PAYLOAD_SIZEOF(CodeSourceMap, InstanceSize, HeaderSize) \
490
PAYLOAD_SIZEOF(CompressedStackMaps, InstanceSize, HeaderSize) \
491
PAYLOAD_SIZEOF(InstructionsSection, InstanceSize, HeaderSize) \
492
PAYLOAD_SIZEOF(PcDescriptors, InstanceSize, HeaderSize) \
493
PAYLOAD_SIZEOF(SuspendState, InstanceSize, HeaderSize) \
494
PAYLOAD_SIZEOF(TypedData, InstanceSize, HeaderSize)
495
496
#define JIT_OFFSETS_LIST(FIELD, ARRAY, SIZEOF, ARRAY_SIZEOF, PAYLOAD_SIZEOF, \
497
RANGE, CONSTANT) \
498
FIELD(Code, active_instructions_offset) \
499
FIELD(Function, usage_counter_offset) \
500
FIELD(ICData, receivers_static_type_offset) \
501
FIELD(SuspendState, frame_capacity_offset)
502
503
#define AOT_OFFSETS_LIST(FIELD, ARRAY, SIZEOF, ARRAY_SIZEOF, PAYLOAD_SIZEOF, \
504
RANGE, CONSTANT) \
505
FIELD(Closure, entry_point_offset)
506
507
#endif
// RUNTIME_VM_COMPILER_RUNTIME_OFFSETS_LIST_H_
Generated on Sun Jun 23 2024 21:55:38 for Flutter Engine by
1.9.4