Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
runtime_api.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_API_H_
6#define RUNTIME_VM_COMPILER_RUNTIME_API_H_
7
8// This header defines the API that compiler can use to interact with the
9// underlying Dart runtime that it is embedded into.
10//
11// Compiler is not allowed to directly interact with any objects - it can only
12// use classes like dart::Object, dart::Code, dart::Function and similar as
13// opaque handles. All interactions should be done through helper methods
14// provided by this header.
15//
16// This header also provides ways to get word sizes, frame layout, field
17// offsets for the target runtime. Note that these can be different from
18// those on the host. Helpers providing access to these values live
19// in compiler::target namespace.
20
21#include "platform/globals.h"
23#include "platform/utils.h"
24
25#include "vm/allocation.h"
26#include "vm/bitfield.h"
27#include "vm/bss_relocs.h"
28#include "vm/class_id.h"
29#include "vm/code_entry_kind.h"
30#include "vm/constants.h"
31#include "vm/frame_layout.h"
32#include "vm/pointer_tagging.h"
34#include "vm/token.h"
35
36namespace dart {
37
38// Forward declarations.
39class LocalVariable;
40class Object;
41class RuntimeEntry;
42class Zone;
43
44#define DO(clazz) \
45 class Untagged##clazz; \
46 class clazz;
48#undef DO
49
50namespace compiler {
51class Assembler;
52}
53
54namespace compiler {
55
56// Host word sizes.
57//
58// Code in the compiler namespace should not use kWordSize and derived
59// constants directly because the word size on host and target might
60// be different.
61//
62// To prevent this we introduce variables that would shadow these
63// constants and introduce compilation errors when used.
64//
65// target::kWordSize and target::ObjectAlignment give access to
66// word size and object alignment offsets for the target.
67//
68// Similarly kHostWordSize gives access to the host word size.
69class InvalidClass {};
89
90static constexpr intptr_t kHostWordSize = dart::kWordSize;
91static constexpr intptr_t kHostWordSizeLog2 = dart::kWordSizeLog2;
92
93//
94// Object handles.
95//
96
97// Create an empty handle.
99
100// Clone the given handle.
101Object& NewZoneHandle(Zone* zone, const Object&);
102
103//
104// Constant objects.
105//
106
107const Object& NullObject();
108const Object& SentinelObject();
109const Bool& TrueObject();
110const Bool& FalseObject();
112const Type& DynamicType();
113const Type& ObjectType();
114const Type& VoidType();
115const Type& IntType();
117const Class& MintClass();
118const Class& DoubleClass();
119const Class& Float32x4Class();
120const Class& Float64x2Class();
121const Class& Int32x4Class();
122const Class& ClosureClass();
123const Array& ArgumentsDescriptorBoxed(intptr_t type_args_len,
124 intptr_t num_arguments);
125
126template <typename To, typename From>
127const To& CastHandle(const From& from) {
128 return reinterpret_cast<const To&>(from);
129}
130
131// Returns true if [a] and [b] are the same object.
132bool IsSameObject(const Object& a, const Object& b);
133
134// Returns true if [a] and [b] represent the same type (are equal).
135bool IsEqualType(const AbstractType& a, const AbstractType& b);
136
137// Returns true if [type] is a subtype of the "int" type (_Smi, _Mint, int or
138// _IntegerImplementation).
139bool IsSubtypeOfInt(const AbstractType& type);
140
141// Returns true if [type] is the "double" type.
142bool IsDoubleType(const AbstractType& type);
143
144// Returns true if [type] is the "double" type.
145bool IsBoolType(const AbstractType& type);
146
147// Returns true if [type] is the "_Smi" type.
148bool IsSmiType(const AbstractType& type);
149
150#if defined(DEBUG)
151// Returns true if the given handle is a zone handle or one of the global
152// cached handles.
153bool IsNotTemporaryScopedHandle(const Object& obj);
154#endif
155
156// Returns true if [obj] resides in old space.
157bool IsInOldSpace(const Object& obj);
158
159// Returns true if [obj] is not a Field/ICData clone.
160//
161// Used to assert that we are not embedding pointers to cloned objects that are
162// used by background compiler into object pools / code.
163bool IsOriginalObject(const Object& object);
164
165// Clear the given handle.
166void SetToNull(Object* obj);
167
168// Helper functions to upcast handles.
169//
170// Note: compiler code cannot include object.h so it cannot see that Object is
171// a superclass of Code or Function - thus we have to cast these pointers using
172// reinterpret_cast.
173inline const Object& ToObject(const Code& handle) {
174 return *reinterpret_cast<const Object*>(&handle);
175}
176
177inline const Object& ToObject(const Function& handle) {
178 return *reinterpret_cast<const Object*>(&handle);
179}
180
181// Returns some hash value for the given object.
182//
183// Note: the given hash value does not necessarily match Object.get:hashCode,
184// or canonical hash.
185intptr_t ObjectHash(const Object& obj);
186
187// Prints the given object into a C string.
188const char* ObjectToCString(const Object& obj);
189
190// If the given object represents a Dart integer returns true and sets [value]
191// to the value of the integer.
192bool HasIntegerValue(const dart::Object& obj, int64_t* value);
193
194// Creates a random cookie to be used for masking constants embedded in the
195// generated code.
196int32_t CreateJitCookie();
197
198// Returns the size in bytes for the given class id.
200
201// Returns the size in bytes for the given class id.
203
204// Looks up the dart:math's _Random._A field.
206
207// Looks up the dart:convert's _Utf8Decoder._scanFlags field.
209
210// Returns the offset in bytes of [field].
212
213#if defined(TARGET_ARCH_IA32)
214uword SymbolsPredefinedAddress();
215#endif
216
223
224class RuntimeEntry : public ValueObject {
225 public:
226 virtual ~RuntimeEntry() {}
227
228 word OffsetFromThread() const;
229
230 bool is_leaf() const;
231 intptr_t argument_count() const;
232
233 protected:
234 explicit RuntimeEntry(const dart::RuntimeEntry* runtime_entry)
235 : runtime_entry_(runtime_entry) {}
236
237 private:
238 const dart::RuntimeEntry* runtime_entry_;
239};
240
241#define DECLARE_RUNTIME_ENTRY(name) \
242 extern const RuntimeEntry& k##name##RuntimeEntry;
244#undef DECLARE_RUNTIME_ENTRY
245
246#define DECLARE_RUNTIME_ENTRY(type, name, ...) \
247 extern const RuntimeEntry& k##name##RuntimeEntry;
249#undef DECLARE_RUNTIME_ENTRY
250
251// Allocate a string object with the given content in the runtime heap.
252const String& AllocateString(const char* buffer);
253
254DART_NORETURN void BailoutWithBranchOffsetError();
255
256// compiler::target namespace contains information about the target platform:
257//
258// - word sizes and derived constants
259// - offsets of fields
260// - sizes of structures
261namespace target {
262
263#if defined(TARGET_ARCH_IS_32_BIT)
264typedef int32_t word;
265typedef uint32_t uword;
266static constexpr intptr_t kWordSizeLog2 = 2;
267#elif defined(TARGET_ARCH_IS_64_BIT)
268typedef int64_t word;
269typedef uint64_t uword;
270static constexpr intptr_t kWordSizeLog2 = 3;
271#else
272#error "Unsupported architecture"
273#endif
274static constexpr intptr_t kWordSize = 1 << kWordSizeLog2;
275static_assert(kWordSize == sizeof(word), "kWordSize should match sizeof(word)");
276// Our compiler code currently assumes this, so formally check it.
277#if !defined(FFI_UNIT_TESTS)
278static_assert(dart::kWordSize >= kWordSize,
279 "Host word size smaller than target word size");
280#endif
281
282#if defined(DART_COMPRESSED_POINTERS)
283static constexpr intptr_t kCompressedWordSize = kInt32Size;
284static constexpr intptr_t kCompressedWordSizeLog2 = kInt32SizeLog2;
285#else
286static constexpr intptr_t kCompressedWordSize = kWordSize;
287static constexpr intptr_t kCompressedWordSizeLog2 = kWordSizeLog2;
288#endif
289
290static constexpr word kBitsPerWordLog2 = kWordSizeLog2 + kBitsPerByteLog2;
291static constexpr word kBitsPerWord = 1 << kBitsPerWordLog2;
292
294
295constexpr word kWordMax = (static_cast<uword>(1) << (kBitsPerWord - 1)) - 1;
296constexpr word kWordMin = -(static_cast<uword>(1) << (kBitsPerWord - 1));
297constexpr uword kUwordMax = static_cast<word>(-1);
298
299// The number of bits in the _magnitude_ of a Smi, not counting the sign bit.
300#if !defined(DART_COMPRESSED_POINTERS)
301constexpr intptr_t kSmiBits = kBitsPerWord - 2;
302#else
303constexpr intptr_t kSmiBits = 30;
304#endif
305constexpr word kSmiMax = (static_cast<uword>(1) << kSmiBits) - 1;
306constexpr word kSmiMin = -(static_cast<uword>(1) << kSmiBits);
307
308// Information about heap pages.
309extern const word kPageSize;
310extern const word kPageSizeInWords;
311extern const word kPageMask;
312
313static constexpr intptr_t kObjectAlignment = ObjectAlignment::kObjectAlignment;
314
315// Note: if other flags are added, then change the check for required parameters
316// when no named arguments are provided in
317// FlowGraphBuilder::BuildClosureCallHasRequiredNamedArgumentsCheck, since it
318// assumes there are no flag slots when no named parameters are required.
319enum ParameterFlags {
320 kRequiredNamedParameterFlag,
321 kNumParameterFlags,
322};
323// Parameter flags are stored in Smis. To ensure shifts and masks can be used to
324// calculate both the parameter flag index in the parameter names array and
325// which bit to check, kNumParameterFlagsPerElement should be a power of two.
326static constexpr intptr_t kNumParameterFlagsPerElementLog2 =
327 kBitsPerWordLog2 - 1 - kNumParameterFlags;
328static constexpr intptr_t kNumParameterFlagsPerElement =
329 1 << kNumParameterFlagsPerElementLog2;
330static_assert(kNumParameterFlagsPerElement <= kSmiBits,
331 "kNumParameterFlagsPerElement should fit in a Smi");
332
333inline intptr_t RoundedAllocationSize(intptr_t size) {
334 return Utils::RoundUp(size, kObjectAlignment);
335}
336// Information about frame_layout that compiler should be targeting.
337extern FrameLayout frame_layout;
338
339constexpr intptr_t kIntSpillFactor = sizeof(int64_t) / kWordSize;
340constexpr intptr_t kDoubleSpillFactor = sizeof(double) / kWordSize;
341
342// Returns the FP-relative index where [variable] can be found (assumes
343// [variable] is not captured), in bytes.
344inline intptr_t FrameOffsetInBytesForVariable(const LocalVariable* variable) {
345 return frame_layout.FrameSlotForVariable(variable) * kWordSize;
346}
347
348// Check whether instance_size is small enough to be encoded in the size tag.
349bool SizeFitsInSizeTag(uword instance_size);
350
351// Encode tag word for a heap allocated object with the given class id and
352// size.
353//
354// Note: even on 64-bit platforms we only use lower 32-bits of the tag word.
356
357//
358// Target specific information about objects.
359//
360
361// Returns true if the given object can be represented as a Smi on the target
362// platform.
363bool IsSmi(const dart::Object& a);
364
365// Returns true if the given value can be represented as a Smi on the target
366// platform.
367bool IsSmi(int64_t value);
368
369// Return raw Smi representation of the given object for the target platform.
371
372// Return raw Smi representation of the given integer value for the target
373// platform.
374//
375// Note: method assumes that caller has validated that value is representable
376// as a Smi.
377word ToRawSmi(intptr_t value);
378
380
381bool IsDouble(const dart::Object& a);
382double DoubleValue(const dart::Object& a);
383
384// If the given object can be loaded from the thread on the target then
385// return true and set offset (if provided) to the offset from the
386// thread pointer to a field that contains the object.
387bool CanLoadFromThread(const dart::Object& object, intptr_t* offset = nullptr);
388
389// On IA32 we can embed raw pointers into generated code.
390#if defined(TARGET_ARCH_IA32)
391// Returns true if the pointer to the given object can be directly embedded
392// into the generated code (because the object is immortal and immovable).
393bool CanEmbedAsRawPointerInGeneratedCode(const dart::Object& obj);
394
395// Returns raw pointer value for the given object. Should only be invoked
396// if CanEmbedAsRawPointerInGeneratedCode returns true.
397word ToRawPointer(const dart::Object& a);
398#endif // defined(TARGET_ARCH_IA32)
399
400bool WillAllocateNewOrRememberedObject(intptr_t instance_size);
401
402bool WillAllocateNewOrRememberedContext(intptr_t num_context_variables);
403
405
406#define FINAL_CLASS() \
407 static word NextFieldOffset() { \
408 return -kWordSize; \
409 }
410
411//
412// Target specific offsets and constants.
413//
414// Currently we use the same names for classes, constants and getters to make
415// migration easier.
416
417class UntaggedObject : public AllStatic {
418 public:
419 static const word kCardRememberedBit;
420 static const word kCanonicalBit;
421 static const word kNewBit;
422 static const word kOldAndNotRememberedBit;
423 static const word kNotMarkedBit;
424 static const word kImmutableBit;
425 static const word kSizeTagPos;
426 static const word kSizeTagSize;
427 static const word kClassIdTagPos;
428 static const word kClassIdTagSize;
429 static const word kHashTagPos;
430 static const word kHashTagSize;
431 static const word kSizeTagMaxSizeTag;
432 static const word kTagBitsSizeTagPos;
433 static const word kBarrierOverlapShift;
434 static const word kGenerationalBarrierMask;
435 static const word kIncrementalBarrierMask;
436
437 static bool IsTypedDataClassId(intptr_t cid);
438};
439
440class UntaggedAbstractType : public AllStatic {
441 public:
442 static const word kTypeStateFinalizedInstantiated;
443 static const word kTypeStateShift;
444 static const word kTypeStateBits;
445 static const word kNullabilityMask;
446};
447
448class UntaggedType : public AllStatic {
449 public:
450 static const word kTypeClassIdShift;
451};
452
453class UntaggedTypeParameter : public AllStatic {
454 public:
455 static const word kIsFunctionTypeParameterBit;
456};
457
458class Object : public AllStatic {
459 public:
460 // Offset of the tags word.
461 static word tags_offset();
462 static word InstanceSize();
463};
464
465class ObjectPool : public AllStatic {
466 public:
467 // Return offset to the element with the given [index] in the object pool.
468 static word element_offset(intptr_t index);
469 static word InstanceSize(intptr_t length);
470 static word InstanceSize();
471 FINAL_CLASS();
472};
473
474class Class : public AllStatic {
475 public:
476 static word host_type_arguments_field_offset_in_words_offset();
477
478 static word declaration_type_offset();
479
480 static word super_type_offset();
481
482 // The offset of the UntaggedObject::num_type_arguments_ field in bytes.
483 static word num_type_arguments_offset();
484
485 // The value used if no type arguments vector is present.
486 static const word kNoTypeArguments;
487
488 static word InstanceSize();
489
490 FINAL_CLASS();
491
492 // Return class id of the given class on the target.
493 static classid_t GetId(const dart::Class& handle);
494
495 // Return instance size for the given class on the target.
496 static uword GetInstanceSize(const dart::Class& handle);
497
498 // Return whether objects of the class on the target contain compressed
499 // pointers.
500 static bool HasCompressedPointers(const dart::Class& handle);
501
502 // Returns the number of type arguments.
503 static intptr_t NumTypeArguments(const dart::Class& klass);
504
505 // Whether [klass] has a type arguments vector field.
506 static bool HasTypeArgumentsField(const dart::Class& klass);
507
508 // Returns the offset (in bytes) of the type arguments vector.
509 static intptr_t TypeArgumentsFieldOffset(const dart::Class& klass);
510
511 // Whether to trace allocation for this klass.
512 static bool TraceAllocation(const dart::Class& klass);
513};
514
515class Instance : public AllStatic {
516 public:
517 // Returns the offset to the first field of [UntaggedInstance].
518 static word first_field_offset();
519 static word native_fields_array_offset();
520 static word DataOffsetFor(intptr_t cid);
521 static word ElementSizeFor(intptr_t cid);
522 static word InstanceSize();
523 static word NextFieldOffset();
524};
525
526class Function : public AllStatic {
527 public:
528 static word code_offset();
529 static word data_offset();
530 static word entry_point_offset(CodeEntryKind kind = CodeEntryKind::kNormal);
531 static word kind_tag_offset();
532 static word signature_offset();
533 static word usage_counter_offset();
534 static word InstanceSize();
535 FINAL_CLASS();
536};
537
538class CallSiteData : public AllStatic {
539 public:
540 static word arguments_descriptor_offset();
541};
542
543class ICData : public AllStatic {
544 public:
545 static word owner_offset();
546 static word entries_offset();
547 static word receivers_static_type_offset();
548 static word state_bits_offset();
549
550 static word CodeIndexFor(word num_args);
551 static word CountIndexFor(word num_args);
552 static word TargetIndexFor(word num_args);
553 static word ExactnessIndexFor(word num_args);
554 static word TestEntryLengthFor(word num_args, bool exactness_check);
555 static word EntryPointIndexFor(word num_args);
556 static word NumArgsTestedShift();
557 static word NumArgsTestedMask();
558 static word InstanceSize();
559 FINAL_CLASS();
560};
561
562class MegamorphicCache : public AllStatic {
563 public:
564 static const word kSpreadFactor;
565 static word mask_offset();
566 static word buckets_offset();
567 static word InstanceSize();
568 FINAL_CLASS();
569};
570
571class SingleTargetCache : public AllStatic {
572 public:
573 static word lower_limit_offset();
574 static word upper_limit_offset();
575 static word entry_point_offset();
576 static word target_offset();
577 static word InstanceSize();
578 FINAL_CLASS();
579};
580
581class Array : public AllStatic {
582 public:
583 static word header_size();
584 static word tags_offset();
585 static word data_offset();
586 static word type_arguments_offset();
587 static word length_offset();
588 static word element_offset(intptr_t index);
589 static intptr_t index_at_offset(intptr_t offset_in_bytes);
590 static word InstanceSize(intptr_t length);
591 static word InstanceSize();
592 FINAL_CLASS();
593
594 static const word kMaxElements;
595 static const word kMaxNewSpaceElements;
596};
597
598class GrowableObjectArray : public AllStatic {
599 public:
600 static word data_offset();
601 static word type_arguments_offset();
602 static word length_offset();
603 static word InstanceSize();
604 FINAL_CLASS();
605};
606
607class RecordShape : public AllStatic {
608 public:
609 static const word kNumFieldsMask;
610 static const word kMaxNumFields;
611 static const word kFieldNamesIndexShift;
612 static const word kFieldNamesIndexMask;
613 static const word kMaxFieldNamesIndex;
614};
615
616class Record : public AllStatic {
617 public:
618 static word shape_offset();
619 static word field_offset(intptr_t index);
620 static intptr_t field_index_at_offset(intptr_t offset_in_bytes);
621 static word InstanceSize(intptr_t length);
622 static word InstanceSize();
623 FINAL_CLASS();
624
625 static const word kMaxElements;
626};
627
628class PointerBase : public AllStatic {
629 public:
630 static word data_offset();
631};
632
633class TypedDataBase : public AllStatic {
634 public:
635 static word length_offset();
636 static word InstanceSize();
637 FINAL_CLASS();
638};
639
640class TypedData : public AllStatic {
641 public:
642 static word payload_offset();
643 static word HeaderSize();
644 static word InstanceSize();
645 static word InstanceSize(word lengthInBytes);
646 FINAL_CLASS();
647};
648
649class ExternalTypedData : public AllStatic {
650 public:
651 static word InstanceSize();
652 FINAL_CLASS();
653};
654
655class TypedDataView : public AllStatic {
656 public:
657 static word offset_in_bytes_offset();
658 static word typed_data_offset();
659 static word InstanceSize();
660 FINAL_CLASS();
661};
662
663class LinkedHashBase : public AllStatic {
664 public:
665 static word index_offset();
666 static word data_offset();
667 static word hash_mask_offset();
668 static word used_data_offset();
669 static word deleted_keys_offset();
670 static word type_arguments_offset();
671 static word InstanceSize();
672};
673
674class ImmutableLinkedHashBase : public LinkedHashBase {
675 public:
676 // The data slot is an immutable list and final in immutable maps and sets.
677 static word data_offset();
678};
679
680class Map : public LinkedHashBase {
681 public:
682 FINAL_CLASS();
683};
684
685class Set : public LinkedHashBase {
686 public:
687 FINAL_CLASS();
688};
689
690class FutureOr : public AllStatic {
691 public:
692 static word type_arguments_offset();
693 static word InstanceSize();
694 FINAL_CLASS();
695};
696
697class ArgumentsDescriptor : public AllStatic {
698 public:
699 static word first_named_entry_offset();
700 static word named_entry_size();
701 static word position_offset();
702 static word name_offset();
703 static word count_offset();
704 static word size_offset();
705 static word type_args_len_offset();
706 static word positional_count_offset();
707};
708
709class LocalHandle : public AllStatic {
710 public:
711 static word ptr_offset();
712 static word InstanceSize();
713};
714
715class PersistentHandle : public AllStatic {
716 public:
717 static word ptr_offset();
718};
719
720class Pointer : public AllStatic {
721 public:
722 static word type_arguments_offset();
723 static word InstanceSize();
724 FINAL_CLASS();
725};
726
727class AbstractType : public AllStatic {
728 public:
729 static word flags_offset();
730 static word hash_offset();
731 static word type_test_stub_entry_point_offset();
732 static word InstanceSize();
733 FINAL_CLASS();
734};
735
736class Type : public AllStatic {
737 public:
738 static word arguments_offset();
739 static word InstanceSize();
740 FINAL_CLASS();
741};
742
743class FunctionType : public AllStatic {
744 public:
745 static word packed_parameter_counts_offset();
746 static word packed_type_parameter_counts_offset();
747 static word named_parameter_names_offset();
748 static word parameter_types_offset();
749 static word type_parameters_offset();
750 static word InstanceSize();
751 FINAL_CLASS();
752};
753
754class RecordType : public AllStatic {
755 public:
756 static word InstanceSize();
757 FINAL_CLASS();
758};
759
760class Nullability : public AllStatic {
761 public:
762 static const uint8_t kNullable;
763 static const uint8_t kNonNullable;
764 static const uint8_t kLegacy;
765};
766
767class Double : public AllStatic {
768 public:
769 static word value_offset();
770 static word InstanceSize();
771 FINAL_CLASS();
772};
773
774class Mint : public AllStatic {
775 public:
776 static word value_offset();
777 static word InstanceSize();
778 FINAL_CLASS();
779};
780
781class String : public AllStatic {
782 public:
783 static const word kHashBits;
784 static const word kMaxElements;
785 static word hash_offset();
786 static word length_offset();
787 static word InstanceSize();
788 static word InstanceSize(word payload_size);
789 FINAL_CLASS();
790};
791
792class OneByteString : public AllStatic {
793 public:
794 static word data_offset();
795 static word InstanceSize(intptr_t length);
796 static word InstanceSize();
797 FINAL_CLASS();
798
799 static const word kMaxNewSpaceElements;
800
801 private:
802 static word element_offset(intptr_t index);
803};
804
805class TwoByteString : public AllStatic {
806 public:
807 static word data_offset();
808 static word InstanceSize(intptr_t length);
809 static word InstanceSize();
810 FINAL_CLASS();
811
812 static const word kMaxNewSpaceElements;
813
814 private:
815 static word element_offset(intptr_t index);
816};
817
818class Int32x4 : public AllStatic {
819 public:
820 static word value_offset();
821 static word InstanceSize();
822 FINAL_CLASS();
823};
824
825class Float32x4 : public AllStatic {
826 public:
827 static word value_offset();
828 static word InstanceSize();
829 FINAL_CLASS();
830};
831
832class Float64x2 : public AllStatic {
833 public:
834 static word value_offset();
835 static word InstanceSize();
836 FINAL_CLASS();
837};
838
839class DynamicLibrary : public AllStatic {
840 public:
841 static word InstanceSize();
842 FINAL_CLASS();
843};
844
845class PatchClass : public AllStatic {
846 public:
847 static word InstanceSize();
848 FINAL_CLASS();
849};
850
851class FfiTrampolineData : public AllStatic {
852 public:
853 static word InstanceSize();
854 FINAL_CLASS();
855};
856
857class Script : public AllStatic {
858 public:
859 static word InstanceSize();
860 FINAL_CLASS();
861};
862
863class Library : public AllStatic {
864 public:
865 static word InstanceSize();
866 FINAL_CLASS();
867};
868
869class Namespace : public AllStatic {
870 public:
871 static word InstanceSize();
872 FINAL_CLASS();
873};
874
875class KernelProgramInfo : public AllStatic {
876 public:
877 static word InstanceSize();
878 FINAL_CLASS();
879};
880
881class PcDescriptors : public AllStatic {
882 public:
883 static word HeaderSize();
884 static word InstanceSize();
885 static word InstanceSize(word payload_size);
886 FINAL_CLASS();
887};
888
889class CodeSourceMap : public AllStatic {
890 public:
891 static word HeaderSize();
892 static word InstanceSize();
893 static word InstanceSize(word payload_size);
894 FINAL_CLASS();
895};
896
897class CompressedStackMaps : public AllStatic {
898 public:
899 static word HeaderSize() { return ObjectHeaderSize() + PayloadHeaderSize(); }
900 static word InstanceSize();
901 static word InstanceSize(word payload_size);
902 FINAL_CLASS();
903
904 private:
905 static word ObjectHeaderSize();
906 static word PayloadHeaderSize();
907};
908
909class LocalVarDescriptors : public AllStatic {
910 public:
911 static word InstanceSize();
912 FINAL_CLASS();
913};
914
915class ExceptionHandlers : public AllStatic {
916 public:
917 static word element_offset(intptr_t index);
918 static word InstanceSize(intptr_t length);
919 static word InstanceSize();
920 FINAL_CLASS();
921};
922
923class ContextScope : public AllStatic {
924 public:
925 static word element_offset(intptr_t index);
926 static word InstanceSize(intptr_t length);
927 static word InstanceSize();
928 FINAL_CLASS();
929};
930
931class Sentinel : public AllStatic {
932 public:
933 static word InstanceSize();
934 FINAL_CLASS();
935};
936
937class UnlinkedCall : public AllStatic {
938 public:
939 static word InstanceSize();
940 FINAL_CLASS();
941};
942
943class ApiError : public AllStatic {
944 public:
945 static word InstanceSize();
946 FINAL_CLASS();
947};
948
949class LanguageError : public AllStatic {
950 public:
951 static word InstanceSize();
952 FINAL_CLASS();
953};
954
955class UnhandledException : public AllStatic {
956 public:
957 static word exception_offset();
958 static word stacktrace_offset();
959 static word InstanceSize();
960 FINAL_CLASS();
961};
962
963class UnwindError : public AllStatic {
964 public:
965 static word InstanceSize();
966 FINAL_CLASS();
967};
968
969class Bool : public AllStatic {
970 public:
971 static word InstanceSize();
972 FINAL_CLASS();
973};
974
975class TypeParameter : public AllStatic {
976 public:
977 static word InstanceSize();
978 FINAL_CLASS();
979 static word index_offset();
980};
981
982class LibraryPrefix : public AllStatic {
983 public:
984 static word InstanceSize();
985 FINAL_CLASS();
986};
987
988class Capability : public AllStatic {
989 public:
990 static word InstanceSize();
991 FINAL_CLASS();
992};
993
994class ReceivePort : public AllStatic {
995 public:
996 static word send_port_offset();
997 static word handler_offset();
998 static word InstanceSize();
999 FINAL_CLASS();
1000};
1001
1002class SendPort : public AllStatic {
1003 public:
1004 static word InstanceSize();
1005 FINAL_CLASS();
1006};
1007
1008class TransferableTypedData : public AllStatic {
1009 public:
1010 static word InstanceSize();
1011 FINAL_CLASS();
1012};
1013
1014class StackTrace : public AllStatic {
1015 public:
1016 static word InstanceSize();
1017 FINAL_CLASS();
1018};
1019
1020class SuspendState : public AllStatic {
1021 public:
1022 static word frame_capacity_offset();
1023 static word frame_size_offset();
1024 static word pc_offset();
1025 static word function_data_offset();
1026 static word then_callback_offset();
1027 static word error_callback_offset();
1028 static word payload_offset();
1029
1030 static word HeaderSize();
1031 static word InstanceSize();
1032 static word InstanceSize(word payload_size);
1033 static word FrameSizeGrowthGap();
1034
1035 FINAL_CLASS();
1036};
1037
1038class Integer : public AllStatic {
1039 public:
1040 static word InstanceSize();
1041 static word NextFieldOffset();
1042};
1043
1044class Smi : public AllStatic {
1045 public:
1046 static word InstanceSize();
1047 FINAL_CLASS();
1048};
1049
1050class WeakProperty : public AllStatic {
1051 public:
1052 static word key_offset();
1053 static word value_offset();
1054 static word InstanceSize();
1055 FINAL_CLASS();
1056};
1057
1058class WeakReference : public AllStatic {
1059 public:
1060 static word target_offset();
1061 static word type_arguments_offset();
1062 static word InstanceSize();
1063 FINAL_CLASS();
1064};
1065
1066class FinalizerBase : public AllStatic {
1067 public:
1068 static word all_entries_offset();
1069 static word detachments_offset();
1070 static word entries_collected_offset();
1071 static word isolate_offset();
1072 FINAL_CLASS();
1073};
1074
1075class Finalizer : public AllStatic {
1076 public:
1077 static word callback_offset();
1078 static word type_arguments_offset();
1079 static word InstanceSize();
1080 FINAL_CLASS();
1081};
1082
1083class NativeFinalizer : public AllStatic {
1084 public:
1085 static word callback_offset();
1086 static word InstanceSize();
1087 FINAL_CLASS();
1088};
1089
1090class FinalizerEntry : public AllStatic {
1091 public:
1092 static word detach_offset();
1093 static word external_size_offset();
1094 static word finalizer_offset();
1095 static word next_offset();
1096 static word token_offset();
1097 static word value_offset();
1098 static word InstanceSize();
1099 FINAL_CLASS();
1100};
1101
1102class MirrorReference : public AllStatic {
1103 public:
1104 static word InstanceSize();
1105 FINAL_CLASS();
1106};
1107
1108class Number : public AllStatic {
1109 public:
1110 static word InstanceSize();
1111 static word NextFieldOffset();
1112};
1113
1114class TimelineStream : public AllStatic {
1115 public:
1116 static word enabled_offset();
1117};
1118
1119class StreamInfo : public AllStatic {
1120 public:
1121 static word enabled_offset();
1122};
1123
1124class MonomorphicSmiableCall : public AllStatic {
1125 public:
1126 static word expected_cid_offset();
1127 static word entrypoint_offset();
1128 static word target_offset();
1129 static word InstanceSize();
1130 FINAL_CLASS();
1131};
1132
1133class TsanUtils : public AllStatic {
1134 public:
1135 static word setjmp_function_offset();
1136 static word setjmp_buffer_offset();
1137 static word exception_pc_offset();
1138 static word exception_sp_offset();
1139 static word exception_fp_offset();
1140};
1141
1142class Thread : public AllStatic {
1143 public:
1144 static word api_top_scope_offset();
1145 static word double_truncate_round_supported_offset();
1146 static word exit_through_ffi_offset();
1147 static uword exit_through_runtime_call();
1148 static uword exit_through_ffi();
1149 static word dart_stream_offset();
1150 static word service_extension_stream_offset();
1151 static word predefined_symbols_address_offset();
1152 static word optimize_entry_offset();
1153 static word deoptimize_entry_offset();
1154 static word megamorphic_call_checked_entry_offset();
1155 static word active_exception_offset();
1156 static word active_stacktrace_offset();
1157 static word resume_pc_offset();
1158 static word saved_shadow_call_stack_offset();
1159 static word marking_stack_block_offset();
1160 static word top_exit_frame_info_offset();
1161 static word top_resource_offset();
1162 static word global_object_pool_offset();
1163 static word object_null_offset();
1164 static word bool_true_offset();
1165 static word bool_false_offset();
1166 static word dispatch_table_array_offset();
1167 static word top_offset();
1168 static word end_offset();
1169 static word isolate_offset();
1170 static word isolate_group_offset();
1171 static word field_table_values_offset();
1172 static word store_buffer_block_offset();
1173 static word call_to_runtime_entry_point_offset();
1174 static word write_barrier_mask_offset();
1175 static word heap_base_offset();
1176 static word switchable_call_miss_entry_offset();
1177 static word write_barrier_wrappers_thread_offset(Register regno);
1178 static word array_write_barrier_entry_point_offset();
1179 static word allocate_mint_with_fpu_regs_entry_point_offset();
1180 static word allocate_mint_without_fpu_regs_entry_point_offset();
1181 static word allocate_object_entry_point_offset();
1182 static word allocate_object_parameterized_entry_point_offset();
1183 static word allocate_object_slow_entry_point_offset();
1184 static word slow_type_test_entry_point_offset();
1185 static word write_barrier_entry_point_offset();
1186 static word vm_tag_offset();
1187 static uword vm_tag_dart_id();
1188
1189 static word safepoint_state_offset();
1190 static uword full_safepoint_state_unacquired();
1191 static uword full_safepoint_state_acquired();
1192
1193 static word execution_state_offset();
1194 static uword vm_execution_state();
1195 static uword native_execution_state();
1196 static uword generated_execution_state();
1197 static word stack_overflow_flags_offset();
1198 static word stack_overflow_shared_stub_entry_point_offset(bool fpu_regs);
1199 static word stack_limit_offset();
1200 static word saved_stack_limit_offset();
1201 static word unboxed_runtime_arg_offset();
1202
1203 static word tsan_utils_offset();
1204 static word jump_to_frame_entry_point_offset();
1205
1206 static word AllocateArray_entry_point_offset();
1207 static word write_barrier_code_offset();
1208 static word array_write_barrier_code_offset();
1209 static word fix_callers_target_code_offset();
1210 static word fix_allocation_stub_code_offset();
1211
1212 static word switchable_call_miss_stub_offset();
1213 static word lazy_specialize_type_test_stub_offset();
1214 static word slow_type_test_stub_offset();
1215 static word call_to_runtime_stub_offset();
1216 static word invoke_dart_code_stub_offset();
1217 static word late_initialization_error_shared_without_fpu_regs_stub_offset();
1218 static word late_initialization_error_shared_with_fpu_regs_stub_offset();
1219 static word null_error_shared_without_fpu_regs_stub_offset();
1220 static word null_error_shared_with_fpu_regs_stub_offset();
1221 static word null_arg_error_shared_without_fpu_regs_stub_offset();
1222 static word null_arg_error_shared_with_fpu_regs_stub_offset();
1223 static word null_cast_error_shared_without_fpu_regs_stub_offset();
1224 static word null_cast_error_shared_with_fpu_regs_stub_offset();
1225 static word range_error_shared_without_fpu_regs_stub_offset();
1226 static word range_error_shared_with_fpu_regs_stub_offset();
1227 static word write_error_shared_without_fpu_regs_stub_offset();
1228 static word write_error_shared_with_fpu_regs_stub_offset();
1229 static word resume_stub_offset();
1230 static word return_async_not_future_stub_offset();
1231 static word return_async_star_stub_offset();
1232 static word return_async_stub_offset();
1233 static word stack_overflow_shared_without_fpu_regs_entry_point_offset();
1234 static word stack_overflow_shared_without_fpu_regs_stub_offset();
1235 static word stack_overflow_shared_with_fpu_regs_entry_point_offset();
1236 static word stack_overflow_shared_with_fpu_regs_stub_offset();
1237 static word lazy_deopt_from_return_stub_offset();
1238 static word lazy_deopt_from_throw_stub_offset();
1239 static word allocate_mint_with_fpu_regs_stub_offset();
1240 static word allocate_mint_without_fpu_regs_stub_offset();
1241 static word allocate_object_stub_offset();
1242 static word allocate_object_parameterized_stub_offset();
1243 static word allocate_object_slow_stub_offset();
1244 static word async_exception_handler_stub_offset();
1245 static word optimize_stub_offset();
1246 static word deoptimize_stub_offset();
1247 static word enter_safepoint_stub_offset();
1248 static word exit_safepoint_stub_offset();
1249 static word exit_safepoint_ignore_unwind_in_progress_stub_offset();
1250 static word call_native_through_safepoint_stub_offset();
1251 static word call_native_through_safepoint_entry_point_offset();
1252
1253 static word bootstrap_native_wrapper_entry_point_offset();
1254 static word no_scope_native_wrapper_entry_point_offset();
1255 static word auto_scope_native_wrapper_entry_point_offset();
1256
1257#define THREAD_XMM_CONSTANT_LIST(V) \
1258 V(float_not) \
1259 V(float_negate) \
1260 V(float_absolute) \
1261 V(float_zerow) \
1262 V(double_negate) \
1263 V(double_abs)
1264
1265#define DECLARE_CONSTANT_OFFSET_GETTER(name) \
1266 static word name##_address_offset();
1268#undef DECLARE_CONSTANT_OFFSET_GETTER
1269
1270 static word next_task_id_offset();
1271 static word random_offset();
1272
1273 static word suspend_state_init_async_entry_point_offset();
1274 static word suspend_state_await_entry_point_offset();
1275 static word suspend_state_await_with_type_check_entry_point_offset();
1276 static word suspend_state_return_async_entry_point_offset();
1277 static word suspend_state_return_async_not_future_entry_point_offset();
1278
1279 static word suspend_state_init_async_star_entry_point_offset();
1280 static word suspend_state_yield_async_star_entry_point_offset();
1281 static word suspend_state_return_async_star_entry_point_offset();
1282
1283 static word suspend_state_init_sync_star_entry_point_offset();
1284 static word suspend_state_suspend_sync_star_at_start_entry_point_offset();
1285
1286 static word suspend_state_handle_exception_entry_point_offset();
1287
1288 static word OffsetFromThread(const dart::Object& object);
1289 static intptr_t OffsetFromThread(const dart::RuntimeEntry* runtime_entry);
1290};
1291
1292class StoreBufferBlock : public AllStatic {
1293 public:
1294 static word top_offset();
1295 static word pointers_offset();
1296 static const word kSize;
1297};
1298
1299class MarkingStackBlock : public AllStatic {
1300 public:
1301 static word top_offset();
1302 static word pointers_offset();
1303 static const word kSize;
1304};
1305
1306class ObjectStore : public AllStatic {
1307 public:
1308 static word double_type_offset();
1309 static word int_type_offset();
1310 static word record_field_names_offset();
1311 static word string_type_offset();
1312 static word type_type_offset();
1313
1314 static word ffi_callback_code_offset();
1315
1316 static word suspend_state_await_offset();
1317 static word suspend_state_await_with_type_check_offset();
1318 static word suspend_state_handle_exception_offset();
1319 static word suspend_state_init_async_offset();
1320 static word suspend_state_init_async_star_offset();
1321 static word suspend_state_init_sync_star_offset();
1322 static word suspend_state_return_async_offset();
1323 static word suspend_state_return_async_not_future_offset();
1324 static word suspend_state_return_async_star_offset();
1325 static word suspend_state_suspend_sync_star_at_start_offset();
1326 static word suspend_state_yield_async_star_offset();
1327};
1328
1329class Isolate : public AllStatic {
1330 public:
1331 static word default_tag_offset();
1332 static word current_tag_offset();
1333 static word user_tag_offset();
1334 static word finalizers_offset();
1335#if !defined(PRODUCT)
1336 static word single_step_offset();
1337 static word has_resumption_breakpoints_offset();
1338#endif // !defined(PRODUCT)
1339};
1340
1341class IsolateGroup : public AllStatic {
1342 public:
1343 static word object_store_offset();
1344 static word class_table_offset();
1345 static word cached_class_table_table_offset();
1346};
1347
1348class ClassTable : public AllStatic {
1349 public:
1350#if !defined(PRODUCT)
1351 static word allocation_tracing_state_table_offset();
1352 static word AllocationTracingStateSlotOffsetFor(intptr_t cid);
1353#endif // !defined(PRODUCT)
1354};
1355
1356class InstructionsSection : public AllStatic {
1357 public:
1358 static word UnalignedHeaderSize();
1359 static word HeaderSize();
1360 static word InstanceSize();
1361 static word InstanceSize(word payload_size);
1362 FINAL_CLASS();
1363};
1364
1365class InstructionsTable : public AllStatic {
1366 public:
1367 static word HeaderSize();
1368 static word InstanceSize();
1369 static word InstanceSize(intptr_t length);
1370 FINAL_CLASS();
1371
1372 private:
1373 static word element_offset(intptr_t index);
1374};
1375
1376class Instructions : public AllStatic {
1377 public:
1378 static const word kMonomorphicEntryOffsetJIT;
1379 static const word kPolymorphicEntryOffsetJIT;
1380 static const word kMonomorphicEntryOffsetAOT;
1381 static const word kPolymorphicEntryOffsetAOT;
1382 static const word kBarePayloadAlignment;
1383 static const word kNonBarePayloadAlignment;
1384 static word UnalignedHeaderSize();
1385 static word HeaderSize();
1386 static word InstanceSize();
1387 static word InstanceSize(word payload_size);
1388 FINAL_CLASS();
1389};
1390
1391class Code : public AllStatic {
1392 public:
1393#if defined(TARGET_ARCH_IA32)
1394 static uword EntryPointOf(const dart::Code& code);
1395#endif // defined(TARGET_ARCH_IA32)
1396
1397 static word object_pool_offset();
1398 static word entry_point_offset(CodeEntryKind kind = CodeEntryKind::kNormal);
1399 static word active_instructions_offset();
1400 static word instructions_offset();
1401 static word owner_offset();
1402 static word HeaderSize();
1403 static word InstanceSize();
1404 static word InstanceSize(intptr_t length);
1405 FINAL_CLASS();
1406
1407 private:
1408 static word element_offset(intptr_t index);
1409};
1410
1411class WeakSerializationReference : public AllStatic {
1412 public:
1413 static word InstanceSize();
1414 FINAL_CLASS();
1415};
1416
1417class WeakArray : public AllStatic {
1418 public:
1419 static word length_offset();
1420 static word element_offset(intptr_t index);
1421 static word InstanceSize(intptr_t length);
1422 static word InstanceSize();
1423 FINAL_CLASS();
1424};
1425
1426class SubtypeTestCache : public AllStatic {
1427 public:
1428 static word cache_offset();
1429 static word num_inputs_offset();
1430
1431 static const word kMaxInputs;
1432 static const word kTestEntryLength;
1433 static const word kInstanceCidOrSignature;
1434 static const word kDestinationType;
1435 static const word kInstanceTypeArguments;
1436 static const word kInstantiatorTypeArguments;
1437 static const word kFunctionTypeArguments;
1438 static const word kInstanceParentFunctionTypeArguments;
1439 static const word kInstanceDelayedFunctionTypeArguments;
1440 static const word kTestResult;
1441 static word InstanceSize();
1442 FINAL_CLASS();
1443};
1444
1445class LoadingUnit : public AllStatic {
1446 public:
1447 static word InstanceSize();
1448 FINAL_CLASS();
1449};
1450
1451class Context : public AllStatic {
1452 public:
1453 static word header_size();
1454 static word parent_offset();
1455 static word num_variables_offset();
1456 static word variable_offset(intptr_t index);
1457 static word InstanceSize(intptr_t length);
1458 static word InstanceSize();
1459 FINAL_CLASS();
1460
1461 static const word kMaxElements;
1462};
1463
1464class Closure : public AllStatic {
1465 public:
1466 static word context_offset();
1467 static word delayed_type_arguments_offset();
1468 static word entry_point_offset();
1469 static word function_offset();
1470 static word function_type_arguments_offset();
1471 static word instantiator_type_arguments_offset();
1472 static word hash_offset();
1473 static word InstanceSize();
1474 FINAL_CLASS();
1475};
1476
1477class ClosureData : public AllStatic {
1478 public:
1479 static word packed_fields_offset();
1480 static word InstanceSize();
1481 FINAL_CLASS();
1482};
1483
1484class Page : public AllStatic {
1485 public:
1486 static const word kBytesPerCardLog2;
1487
1488 static word card_table_offset();
1489 static word original_top_offset();
1490 static word original_end_offset();
1491};
1492
1493class Heap : public AllStatic {
1494 public:
1495 // Return true if an object with the given instance size is allocatable
1496 // in new space on the target.
1497 static bool IsAllocatableInNewSpace(intptr_t instance_size);
1498};
1499
1500class NativeArguments {
1501 public:
1502 static word thread_offset();
1503 static word argc_tag_offset();
1504 static word argv_offset();
1505 static word retval_offset();
1506
1507 static word StructSize();
1508};
1509
1510class NativeEntry {
1511 public:
1512 static const word kNumCallWrapperArguments;
1513};
1514
1515class RegExp : public AllStatic {
1516 public:
1517 static word function_offset(classid_t cid, bool sticky);
1518 static word InstanceSize();
1519 FINAL_CLASS();
1520};
1521
1522class UserTag : public AllStatic {
1523 public:
1524 static word tag_offset();
1525 static word InstanceSize();
1526 FINAL_CLASS();
1527};
1528
1529class Symbols : public AllStatic {
1530 public:
1531 static const word kNumberOfOneCharCodeSymbols;
1532 static const word kNullCharCodeSymbolOffset;
1533};
1534
1535class Field : public AllStatic {
1536 public:
1537 static word OffsetOf(const dart::Field& field);
1538
1539 static word guarded_cid_offset();
1540 static word guarded_list_length_in_object_offset_offset();
1541 static word guarded_list_length_offset();
1542 static word is_nullable_offset();
1543 static word kind_bits_offset();
1544 static word initializer_function_offset();
1545 static word host_offset_or_field_id_offset();
1546 static word InstanceSize();
1547 FINAL_CLASS();
1548};
1549
1550class TypeParameters : public AllStatic {
1551 public:
1552 static word names_offset();
1553 static word flags_offset();
1554 static word bounds_offset();
1555 static word defaults_offset();
1556 static word InstanceSize();
1557 FINAL_CLASS();
1558};
1559
1560class TypeArguments : public AllStatic {
1561 public:
1562 static word hash_offset();
1563 static word instantiations_offset();
1564 static word length_offset();
1565 static word nullability_offset();
1566 static word type_at_offset(intptr_t i);
1567 static word types_offset();
1568 static word InstanceSize(intptr_t length);
1569 static word InstanceSize();
1570 FINAL_CLASS();
1571
1572 static const word kMaxElements;
1573};
1574
1575class FreeListElement : public AllStatic {
1576 public:
1577 class FakeInstance : public AllStatic {
1578 public:
1579 static word InstanceSize();
1581 };
1582};
1583
1584class ForwardingCorpse : public AllStatic {
1585 public:
1586 class FakeInstance : public AllStatic {
1587 public:
1588 static word InstanceSize();
1590 };
1591};
1592
1593class FieldTable : public AllStatic {
1594 public:
1595 static word OffsetOf(const dart::Field& field);
1596};
1597
1598void UnboxFieldIfSupported(const dart::Field& field,
1599 const dart::AbstractType& type);
1600
1601} // namespace target
1602} // namespace compiler
1603} // namespace dart
1604
1605#endif // RUNTIME_VM_COMPILER_RUNTIME_API_H_
#define CLASS_LIST_FOR_HANDLES(V)
Definition class_id.h:193
static constexpr T RoundUp(T x, uintptr_t alignment, uintptr_t offset=0)
Definition utils.h:105
intptr_t argument_count() const
RuntimeEntry(const dart::RuntimeEntry *runtime_entry)
#define DO(type, attrs)
static bool b
struct MyStruct a[10]
static const uint8_t buffer[]
uint32_t * target
size_t length
uword MakeTagWordForNewSpaceObject(classid_t cid, uword instance_size)
bool WillAllocateNewOrRememberedContext(intptr_t num_context_variables)
void UnboxFieldIfSupported(const dart::Field &field, const dart::AbstractType &type)
bool CanLoadFromThread(const dart::Object &object, intptr_t *offset)
bool WillAllocateNewOrRememberedArray(intptr_t length)
double DoubleValue(const dart::Object &a)
word ToRawSmi(const dart::Object &a)
bool IsDouble(const dart::Object &a)
bool IsSmi(int64_t v)
bool SizeFitsInSizeTag(uword instance_size)
bool WillAllocateNewOrRememberedObject(intptr_t instance_size)
word SmiValue(const dart::Object &a)
InvalidClass kSmiMax
static constexpr intptr_t kHostWordSizeLog2
Definition runtime_api.h:91
const Type & ObjectType()
InvalidClass kNewObjectAlignmentOffset
void BailoutWithBranchOffsetError()
const Field & LookupConvertUtf8DecoderScanFlagsField()
const Class & Int32x4Class()
Object & NewZoneHandle(Zone *zone)
static constexpr intptr_t kHostWordSize
Definition runtime_api.h:90
InvalidClass kWordMax
const Class & Float64x2Class()
bool IsBoolType(const AbstractType &type)
InvalidClass kWordMin
InvalidClass kUWordMax
InvalidClass kWordSizeLog2
const Type & VoidType()
word LookupFieldOffsetInBytes(const Field &field)
word TypedDataMaxNewSpaceElements(classid_t cid)
const Class & GrowableObjectArrayClass()
const Type & IntType()
const Class & Float32x4Class()
intptr_t ObjectHash(const Object &obj)
word TypedDataElementSizeInBytes(classid_t cid)
bool IsOriginalObject(const Object &object)
InvalidClass kObjectAlignment
int32_t CreateJitCookie()
void SetToNull(Object *obj)
const String & AllocateString(const char *buffer)
InvalidClass kObjectAlignmentLog2
InvalidClass kPageSize
const Array & ArgumentsDescriptorBoxed(intptr_t type_args_len, intptr_t num_arguments)
InvalidClass kBitsPerWord
const Code & StubCodeSubtype2TestCache()
InvalidClass kPageMask
const Bool & TrueObject()
bool IsDoubleType(const AbstractType &type)
const Code & StubCodeSubtype6TestCache()
const Code & StubCodeSubtype7TestCache()
const Code & StubCodeSubtype3TestCache()
bool IsInOldSpace(const Object &obj)
InvalidClass kObjectAlignmentMask
const Object & SentinelObject()
bool IsEqualType(const AbstractType &a, const AbstractType &b)
bool IsSubtypeOfInt(const AbstractType &type)
bool IsSameObject(const Object &a, const Object &b)
const Class & ClosureClass()
InvalidClass kOldObjectAlignmentOffset
InvalidClass kNewObjectBitPosition
const Bool & FalseObject()
const Object & NullObject()
InvalidClass kBitsPerWordLog2
const Class & DoubleClass()
InvalidClass kSmiBits
const Field & LookupMathRandomStateFieldOffset()
const Object & EmptyTypeArguments()
bool IsSmiType(const AbstractType &type)
const char * ObjectToCString(const Object &obj)
const Code & StubCodeAllocateArray()
const Class & MintClass()
const To & CastHandle(const From &from)
const Code & StubCodeSubtype4TestCache()
InvalidClass kWordSize
const Object & ToObject(const Code &handle)
bool HasIntegerValue(const dart::Object &object, int64_t *value)
const Type & DynamicType()
InvalidClass kPageSizeInWords
InvalidClass kSmiMin
StoreBuffer::Block StoreBufferBlock
constexpr intptr_t kBitsPerWordLog2
Definition globals.h:513
constexpr intptr_t kBitsPerByteLog2
Definition globals.h:462
Nullability
Definition object.h:1112
MarkingStack::Block MarkingStackBlock
int32_t classid_t
Definition globals.h:524
constexpr intptr_t kInt32SizeLog2
Definition globals.h:449
constexpr intptr_t kWordSizeLog2
Definition globals.h:507
uintptr_t uword
Definition globals.h:501
intptr_t word
Definition globals.h:500
bool IsAllocatableInNewSpace(intptr_t size)
Definition spaces.h:57
constexpr intptr_t kInt32Size
Definition globals.h:450
const intptr_t cid
constexpr intptr_t kWordSize
Definition globals.h:509
constexpr SkISize kSize
std::function< void(Dart_NativeArguments)> NativeEntry
@ ApiError
The Dart error code for an API error.
#define DECLARE_CONSTANT_OFFSET_GETTER(name)
#define THREAD_XMM_CONSTANT_LIST(V)
#define DECLARE_RUNTIME_ENTRY(name)
#define FINAL_CLASS()
#define RUNTIME_ENTRY_LIST(V)
#define LEAF_RUNTIME_ENTRY_LIST(V)
Point offset
intptr_t FrameSlotForVariable(const LocalVariable *variable) const
static constexpr intptr_t kObjectAlignment