Flutter Engine
The Flutter Engine
Classes | Typedefs | Enumerations | Functions | Variables
dart::compiler::target Namespace Reference

Classes

class  AbstractType
 
class  ApiError
 
class  ArgumentsDescriptor
 
class  Array
 
class  Bool
 
class  CallSiteData
 
class  Capability
 
class  Class
 
class  ClassTable
 
class  Closure
 
class  ClosureData
 
class  Code
 
class  CodeSourceMap
 
class  CompressedStackMaps
 
class  Context
 
class  ContextScope
 
class  Double
 
class  DynamicLibrary
 
class  ExceptionHandlers
 
class  ExternalTypedData
 
class  FfiTrampolineData
 
class  Field
 
class  FieldTable
 
class  Finalizer
 
class  FinalizerBase
 
class  FinalizerEntry
 
class  Float32x4
 
class  Float64x2
 
class  ForwardingCorpse
 
class  FreeListElement
 
class  Function
 
class  FunctionType
 
class  FutureOr
 
class  GrowableObjectArray
 
class  Heap
 
class  ICData
 
class  ImmutableLinkedHashBase
 
class  Instance
 
class  Instructions
 
class  InstructionsSection
 
class  InstructionsTable
 
class  Int32x4
 
class  Integer
 
class  Isolate
 
class  IsolateGroup
 
class  KernelProgramInfo
 
class  LanguageError
 
class  Library
 
class  LibraryPrefix
 
class  LinkedHashBase
 
class  LoadingUnit
 
class  LocalHandle
 
class  LocalVarDescriptors
 
class  Map
 
class  MarkingStackBlock
 
class  MegamorphicCache
 
class  Mint
 
class  MirrorReference
 
class  MonomorphicSmiableCall
 
class  Namespace
 
class  NativeArguments
 
class  NativeEntry
 
class  NativeFinalizer
 
class  Nullability
 
class  Number
 
class  Object
 
class  ObjectPool
 
class  ObjectStore
 
class  OneByteString
 
class  Page
 
class  PatchClass
 
class  PcDescriptors
 
class  PersistentHandle
 
class  Pointer
 
class  PointerBase
 
class  ReceivePort
 
class  Record
 
class  RecordShape
 
class  RecordType
 
class  RegExp
 
class  Script
 
class  SendPort
 
class  Sentinel
 
class  Set
 
class  SingleTargetCache
 
class  Smi
 
class  StackTrace
 
class  StoreBufferBlock
 
class  StreamInfo
 
class  String
 
class  SubtypeTestCache
 
class  SuspendState
 
class  Symbols
 
class  Thread
 
class  TimelineStream
 
class  TransferableTypedData
 
class  TsanUtils
 
class  TwoByteString
 
class  Type
 
class  TypeArguments
 
class  TypedData
 
class  TypedDataBase
 
class  TypedDataView
 
class  TypeParameter
 
class  TypeParameters
 
class  UnhandledException
 
class  UnlinkedCall
 
class  UntaggedAbstractType
 
class  UntaggedObject
 
class  UntaggedType
 
class  UntaggedTypeParameter
 
class  UnwindError
 
class  UserTag
 
class  WeakArray
 
class  WeakProperty
 
class  WeakReference
 
class  WeakSerializationReference
 

Typedefs

using ObjectAlignment = dart::ObjectAlignment< kWordSize, kWordSizeLog2 >
 

Enumerations

enum  ParameterFlags { kRequiredNamedParameterFlag , kNumParameterFlags }
 

Functions

bool IsSmi (int64_t v)
 
bool WillAllocateNewOrRememberedObject (intptr_t instance_size)
 
bool WillAllocateNewOrRememberedContext (intptr_t num_context_variables)
 
bool WillAllocateNewOrRememberedArray (intptr_t length)
 
static word TranslateOffsetInWordsToHost (word offset)
 
bool SizeFitsInSizeTag (uword instance_size)
 
uword MakeTagWordForNewSpaceObject (classid_t cid, uword instance_size)
 
bool IsTypedDataClassId (intptr_t cid)
 
static word TranslateOffsetInWords (word offset)
 
static uword GetInstanceSizeImpl (const dart::Class &handle)
 
 JIT_OFFSETS_LIST (DEFINE_JIT_FIELD, DEFINE_JIT_ARRAY, DEFINE_JIT_SIZEOF, DEFINE_ARRAY_SIZEOF, DEFINE_PAYLOAD_SIZEOF, DEFINE_JIT_RANGE, DEFINE_CONSTANT) AOT_OFFSETS_LIST(DEFINE_AOT_FIELD
 
static DART_FORCE_INLINE bool BareInstructionsPayloads ()
 
bool CanLoadFromThread (const dart::Object &object, intptr_t *offset)
 
bool IsSmi (const dart::Object &a)
 
word ToRawSmi (const dart::Object &a)
 
word ToRawSmi (intptr_t value)
 
word SmiValue (const dart::Object &a)
 
bool IsDouble (const dart::Object &a)
 
double DoubleValue (const dart::Object &a)
 
void UnboxFieldIfSupported (const dart::Field &field, const dart::AbstractType &type)
 
intptr_t RoundedAllocationSize (intptr_t size)
 
intptr_t FrameOffsetInBytesForVariable (const LocalVariable *variable)
 

Variables

const word kPageSize = dart::kPageSize
 
const word kPageSizeInWords = dart::kPageSize / kWordSize
 
const word kPageMask = dart::kPageMask
 
 DEFINE_AOT_ARRAY
 
 DEFINE_AOT_SIZEOF
 
 DEFINE_ARRAY_SIZEOF
 
 DEFINE_PAYLOAD_SIZEOF
 
 DEFINE_AOT_RANGE
 
static constexpr intptr_t kWordSize = 1 << kWordSizeLog2
 
static constexpr intptr_t kCompressedWordSize = kWordSize
 
static constexpr intptr_t kCompressedWordSizeLog2 = kWordSizeLog2
 
static constexpr word kBitsPerWordLog2 = kWordSizeLog2 + kBitsPerByteLog2
 
static constexpr word kBitsPerWord = 1 << kBitsPerWordLog2
 
constexpr word kWordMax = (static_cast<uword>(1) << (kBitsPerWord - 1)) - 1
 
constexpr word kWordMin = -(static_cast<uword>(1) << (kBitsPerWord - 1))
 
constexpr uword kUwordMax = static_cast<word>(-1)
 
constexpr intptr_t kSmiBits = kBitsPerWord - 2
 
constexpr word kSmiMax = (static_cast<uword>(1) << kSmiBits) - 1
 
constexpr word kSmiMin = -(static_cast<uword>(1) << kSmiBits)
 
static constexpr intptr_t kObjectAlignment = ObjectAlignment::kObjectAlignment
 
static constexpr intptr_t kNumParameterFlagsPerElementLog2
 
static constexpr intptr_t kNumParameterFlagsPerElement
 
FrameLayout frame_layout = invalid_frame_layout
 
constexpr intptr_t kIntSpillFactor = sizeof(int64_t) / kWordSize
 
constexpr intptr_t kDoubleSpillFactor = sizeof(double) / kWordSize
 

Typedef Documentation

◆ ObjectAlignment

Definition at line 293 of file runtime_api.h.

Enumeration Type Documentation

◆ ParameterFlags

Enumerator
kRequiredNamedParameterFlag 
kNumParameterFlags 

Definition at line 319 of file runtime_api.h.

Function Documentation

◆ BareInstructionsPayloads()

static DART_FORCE_INLINE bool dart::compiler::target::BareInstructionsPayloads ( )
static

Definition at line 869 of file runtime_api.cc.

869 {
870 return FLAG_precompiled_mode;
871}

◆ CanLoadFromThread()

bool dart::compiler::target::CanLoadFromThread ( const dart::Object object,
intptr_t *  offset 
)

Definition at line 941 of file runtime_api.cc.

942 {
944 if (offset != nullptr) {
945 *offset = Thread::OffsetFromThread(object);
946 }
947 return true;
948 }
949 return false;
950}
static bool CanLoadFromThread(const Object &object)
Definition: thread.cc:1154
SeparatedVector2 offset

◆ DoubleValue()

double dart::compiler::target::DoubleValue ( const dart::Object a)

Definition at line 978 of file runtime_api.cc.

978 {
980 return dart::Double::Cast(a).value();
981}
#define RELEASE_ASSERT(cond)
Definition: assert.h:327
struct MyStruct a[10]
bool IsDouble(const dart::Object &a)
Definition: runtime_api.cc:974

◆ FrameOffsetInBytesForVariable()

intptr_t dart::compiler::target::FrameOffsetInBytesForVariable ( const LocalVariable variable)
inline

Definition at line 344 of file runtime_api.h.

344 {
346}
static constexpr intptr_t kWordSize
Definition: runtime_api.h:274
FrameLayout frame_layout
Definition: stack_frame.cc:76
intptr_t FrameSlotForVariable(const LocalVariable *variable) const
Definition: stack_frame.cc:83

◆ GetInstanceSizeImpl()

static uword dart::compiler::target::GetInstanceSizeImpl ( const dart::Class handle)
static

Definition at line 450 of file runtime_api.cc.

450 {
451 switch (handle.id()) {
452 case kMintCid:
453 return Mint::InstanceSize();
454 case kDoubleCid:
455 return Double::InstanceSize();
456 case kInt32x4Cid:
457 return Int32x4::InstanceSize();
458 case kFloat32x4Cid:
459 return Float32x4::InstanceSize();
460 case kFloat64x2Cid:
461 return Float64x2::InstanceSize();
462 case kObjectCid:
463 return Object::InstanceSize();
464 case kInstanceCid:
465 return Instance::InstanceSize();
466 case kGrowableObjectArrayCid:
467 return GrowableObjectArray::InstanceSize();
468 case kClosureCid:
469 return Closure::InstanceSize();
470 case kTypedDataBaseCid:
471 return TypedDataBase::InstanceSize();
472 case kMapCid:
473 return Map::InstanceSize();
474 case kSetCid:
475 return Set::InstanceSize();
476 case kUnhandledExceptionCid:
477 return UnhandledException::InstanceSize();
478 case kWeakPropertyCid:
479 return WeakProperty::InstanceSize();
480 case kWeakReferenceCid:
481 return WeakReference::InstanceSize();
482 case kFinalizerCid:
483 return Finalizer::InstanceSize();
484 case kFinalizerEntryCid:
485 return FinalizerEntry::InstanceSize();
486 case kNativeFinalizerCid:
487 return NativeFinalizer::InstanceSize();
488 case kByteBufferCid:
489 case kByteDataViewCid:
491 case kPointerCid:
492 case kDynamicLibraryCid:
493#define HANDLE_CASE(clazz) case kFfi##clazz##Cid:
495#undef HANDLE_CASE
496#define HANDLE_CASE(clazz) \
497 case kTypedData##clazz##Cid: \
498 case kTypedData##clazz##ViewCid: \
499 case kExternalTypedData##clazz##Cid: \
500 case kUnmodifiableTypedData##clazz##ViewCid:
502#undef HANDLE_CASE
503 return handle.target_instance_size();
504 default:
505 if (handle.id() >= kNumPredefinedCids) {
506 return handle.target_instance_size();
507 }
508 }
509 FATAL("Unsupported class for size translation: %s (id=%" Pd
510 ", kNumPredefinedCids=%" Pd ")\n",
511 handle.ToCString(), handle.id(), kNumPredefinedCids);
512 return -1;
513}
#define CLASS_LIST_FFI_TYPE_MARKER(V)
Definition: class_id.h:165
#define CLASS_LIST_TYPED_DATA(V)
Definition: class_id.h:137
intptr_t id() const
Definition: object.h:1233
intptr_t target_instance_size() const
Definition: object.h:1147
virtual const char * ToCString() const
Definition: object.h:366
#define FATAL(error)
@ kNumPredefinedCids
Definition: class_id.h:257
@ kByteDataViewCid
Definition: class_id.h:244
@ kByteBufferCid
Definition: class_id.h:247
@ kUnmodifiableByteDataViewCid
Definition: class_id.h:245
#define Pd
Definition: globals.h:408
#define HANDLE_CASE(clazz)

◆ IsDouble()

bool dart::compiler::target::IsDouble ( const dart::Object a)

Definition at line 974 of file runtime_api.cc.

974 {
975 return a.IsDouble();
976}

◆ IsSmi() [1/2]

bool dart::compiler::target::IsSmi ( const dart::Object a)

Definition at line 956 of file runtime_api.cc.

956 {
957 return a.IsSmi() && IsSmi(dart::Smi::Cast(a).Value());
958}
Definition: il.h:75
bool IsSmi(const dart::Object &a)
Definition: runtime_api.cc:956

◆ IsSmi() [2/2]

bool dart::compiler::target::IsSmi ( int64_t  v)

Definition at line 31 of file runtime_api.cc.

31 {
32 return Utils::IsInt(kSmiBits + 1, v);
33}
InvalidClass kSmiBits

◆ IsTypedDataClassId()

bool dart::compiler::target::IsTypedDataClassId ( intptr_t  cid)

Definition at line 435 of file runtime_api.cc.

435 {
437}
bool IsTypedDataClassId(intptr_t index)
Definition: class_id.h:433
const intptr_t cid

◆ JIT_OFFSETS_LIST()

dart::compiler::target::JIT_OFFSETS_LIST ( DEFINE_JIT_FIELD  ,
DEFINE_JIT_ARRAY  ,
DEFINE_JIT_SIZEOF  ,
DEFINE_ARRAY_SIZEOF  ,
DEFINE_PAYLOAD_SIZEOF  ,
DEFINE_JIT_RANGE  ,
DEFINE_CONSTANT   
)

◆ MakeTagWordForNewSpaceObject()

uword dart::compiler::target::MakeTagWordForNewSpaceObject ( classid_t  cid,
uword  instance_size 
)

◆ RoundedAllocationSize()

intptr_t dart::compiler::target::RoundedAllocationSize ( intptr_t  size)
inline

Definition at line 333 of file runtime_api.h.

333 {
335}
static constexpr intptr_t kObjectAlignment
Definition: runtime_api.h:313
static void RoundUp(Vector< char > buffer, int *length, int *decimal_point)
Definition: fixed-dtoa.cc:189
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259

◆ SizeFitsInSizeTag()

bool dart::compiler::target::SizeFitsInSizeTag ( uword  instance_size)

Definition at line 355 of file runtime_api.cc.

355 {
357 TranslateOffsetInWordsToHost(instance_size));
358}
static constexpr bool SizeFits(intptr_t size)
Definition: raw_object.h:216

◆ SmiValue()

word dart::compiler::target::SmiValue ( const dart::Object a)

Definition at line 969 of file runtime_api.cc.

969 {
971 return static_cast<word>(dart::Smi::Cast(a).Value());
972}
intptr_t word
Definition: globals.h:500

◆ ToRawSmi() [1/2]

word dart::compiler::target::ToRawSmi ( const dart::Object a)

Definition at line 960 of file runtime_api.cc.

960 {
962 return static_cast<compressed_word>(static_cast<intptr_t>(a.ptr()));
963}
intptr_t compressed_word
Definition: globals.h:45

◆ ToRawSmi() [2/2]

word dart::compiler::target::ToRawSmi ( intptr_t  value)

Definition at line 965 of file runtime_api.cc.

965 {
967}
static intptr_t RawValue(intptr_t value)
Definition: object.h:10022
uint8_t value

◆ TranslateOffsetInWords()

static word dart::compiler::target::TranslateOffsetInWords ( word  offset)
static

Definition at line 445 of file runtime_api.cc.

445 {
447 return (offset / dart::kWordSize) * kWordSize;
448}
constexpr intptr_t kWordSize
Definition: globals.h:509

◆ TranslateOffsetInWordsToHost()

static word dart::compiler::target::TranslateOffsetInWordsToHost ( word  offset)
static

Definition at line 350 of file runtime_api.cc.

350 {
353}
static constexpr intptr_t kCompressedWordSize
Definition: runtime_api.h:286
static constexpr intptr_t kCompressedWordSize
Definition: globals.h:42

◆ UnboxFieldIfSupported()

void dart::compiler::target::UnboxFieldIfSupported ( const dart::Field field,
const dart::AbstractType type 
)

Definition at line 1080 of file runtime_api.cc.

1081 {
1082 if (field.is_static() || field.is_late()) {
1083 return;
1084 }
1085
1086 if (type.IsNullable()) {
1087 return;
1088 }
1089
1091 if (type.IsDoubleType()) {
1092 cid = kDoubleCid;
1093 } else if (type.IsFloat32x4Type()) {
1094 if (FlowGraphCompiler::SupportsUnboxedSimd128()) {
1095 cid = kFloat32x4Cid;
1096 }
1097 } else if (type.IsFloat64x2Type()) {
1098 if (FlowGraphCompiler::SupportsUnboxedSimd128()) {
1099 cid = kFloat64x2Cid;
1100 }
1101 }
1102
1103 if (cid != kIllegalCid) {
1104 field.set_guarded_cid(cid);
1105 field.set_is_nullable(false);
1106 field.set_is_unboxed(true);
1110 }
1111}
GLenum type
void set_is_unboxed(bool b) const
Definition: object.h:4720
@ kUnknownLengthOffset
Definition: object.h:4727
@ kNoFixedLength
Definition: object.h:4729
bool is_late() const
Definition: object.h:4444
bool is_static() const
Definition: object.h:4440
void set_guarded_cid(intptr_t cid) const
Definition: object.h:4660
void set_guarded_list_length_in_object_offset(intptr_t offset) const
Definition: object.h:4688
void set_is_nullable(bool val) const
Definition: object.h:4753
void set_guarded_list_length(intptr_t list_length) const
Definition: object.h:4678
int32_t classid_t
Definition: globals.h:524
@ kIllegalCid
Definition: class_id.h:214

◆ WillAllocateNewOrRememberedArray()

bool dart::compiler::target::WillAllocateNewOrRememberedArray ( intptr_t  length)

Definition at line 46 of file runtime_api.cc.

46 {
47 if (!dart::Array::IsValidLength(length)) return false;
49}
static constexpr bool UseCardMarkingForAllocation(const intptr_t array_length)
Definition: object.h:10818
static constexpr bool IsValidLength(intptr_t len)
Definition: object.h:10932
size_t length

◆ WillAllocateNewOrRememberedContext()

bool dart::compiler::target::WillAllocateNewOrRememberedContext ( intptr_t  num_context_variables)

Definition at line 40 of file runtime_api.cc.

40 {
41 if (!dart::Context::IsValidLength(num_context_variables)) return false;
43 dart::Context::InstanceSize(num_context_variables));
44}
static bool IsValidLength(intptr_t len)
Definition: object.h:7444
static intptr_t InstanceSize()
Definition: object.h:7448
bool IsAllocatableInNewSpace(intptr_t size)
Definition: spaces.h:57

◆ WillAllocateNewOrRememberedObject()

bool dart::compiler::target::WillAllocateNewOrRememberedObject ( intptr_t  instance_size)

Definition at line 35 of file runtime_api.cc.

35 {
36 ASSERT(Utils::IsAligned(instance_size, ObjectAlignment::kObjectAlignment));
37 return dart::IsAllocatableInNewSpace(instance_size);
38}
#define ASSERT(E)
InvalidClass kObjectAlignment

Variable Documentation

◆ DEFINE_AOT_ARRAY

dart::compiler::target::DEFINE_AOT_ARRAY

Definition at line 800 of file runtime_api.cc.

◆ DEFINE_AOT_RANGE

dart::compiler::target::DEFINE_AOT_RANGE

Definition at line 804 of file runtime_api.cc.

◆ DEFINE_AOT_SIZEOF

dart::compiler::target::DEFINE_AOT_SIZEOF

Definition at line 801 of file runtime_api.cc.

◆ DEFINE_ARRAY_SIZEOF

dart::compiler::target::DEFINE_ARRAY_SIZEOF

Definition at line 802 of file runtime_api.cc.

◆ DEFINE_PAYLOAD_SIZEOF

dart::compiler::target::DEFINE_PAYLOAD_SIZEOF

Definition at line 803 of file runtime_api.cc.

◆ frame_layout

FrameLayout dart::compiler::target::frame_layout = invalid_frame_layout

Definition at line 76 of file stack_frame.cc.

◆ kBitsPerWord

constexpr word dart::compiler::target::kBitsPerWord = 1 << kBitsPerWordLog2
staticconstexpr

Definition at line 291 of file runtime_api.h.

◆ kBitsPerWordLog2

constexpr word dart::compiler::target::kBitsPerWordLog2 = kWordSizeLog2 + kBitsPerByteLog2
staticconstexpr

Definition at line 290 of file runtime_api.h.

◆ kCompressedWordSize

constexpr intptr_t dart::compiler::target::kCompressedWordSize = kWordSize
staticconstexpr

Definition at line 286 of file runtime_api.h.

◆ kCompressedWordSizeLog2

constexpr intptr_t dart::compiler::target::kCompressedWordSizeLog2 = kWordSizeLog2
staticconstexpr

Definition at line 287 of file runtime_api.h.

◆ kDoubleSpillFactor

constexpr intptr_t dart::compiler::target::kDoubleSpillFactor = sizeof(double) / kWordSize
constexpr

Definition at line 340 of file runtime_api.h.

◆ kIntSpillFactor

constexpr intptr_t dart::compiler::target::kIntSpillFactor = sizeof(int64_t) / kWordSize
constexpr

Definition at line 339 of file runtime_api.h.

◆ kNumParameterFlagsPerElement

constexpr intptr_t dart::compiler::target::kNumParameterFlagsPerElement
staticconstexpr
Initial value:
=
static constexpr intptr_t kNumParameterFlagsPerElementLog2
Definition: runtime_api.h:326

Definition at line 328 of file runtime_api.h.

◆ kNumParameterFlagsPerElementLog2

constexpr intptr_t dart::compiler::target::kNumParameterFlagsPerElementLog2
staticconstexpr
Initial value:
=
static constexpr word kBitsPerWordLog2
Definition: runtime_api.h:290

Definition at line 326 of file runtime_api.h.

◆ kObjectAlignment

constexpr intptr_t dart::compiler::target::kObjectAlignment = ObjectAlignment::kObjectAlignment
staticconstexpr

Definition at line 313 of file runtime_api.h.

◆ kPageMask

const word dart::compiler::target::kPageMask = dart::kPageMask

Definition at line 348 of file runtime_api.cc.

◆ kPageSize

const word dart::compiler::target::kPageSize = dart::kPageSize

Definition at line 346 of file runtime_api.cc.

◆ kPageSizeInWords

const word dart::compiler::target::kPageSizeInWords = dart::kPageSize / kWordSize

Definition at line 347 of file runtime_api.cc.

◆ kSmiBits

constexpr intptr_t dart::compiler::target::kSmiBits = kBitsPerWord - 2
constexpr

Definition at line 301 of file runtime_api.h.

◆ kSmiMax

constexpr word dart::compiler::target::kSmiMax = (static_cast<uword>(1) << kSmiBits) - 1
constexpr

Definition at line 305 of file runtime_api.h.

◆ kSmiMin

constexpr word dart::compiler::target::kSmiMin = -(static_cast<uword>(1) << kSmiBits)
constexpr

Definition at line 306 of file runtime_api.h.

◆ kUwordMax

constexpr uword dart::compiler::target::kUwordMax = static_cast<word>(-1)
constexpr

Definition at line 297 of file runtime_api.h.

◆ kWordMax

constexpr word dart::compiler::target::kWordMax = (static_cast<uword>(1) << (kBitsPerWord - 1)) - 1
constexpr

Definition at line 295 of file runtime_api.h.

◆ kWordMin

constexpr word dart::compiler::target::kWordMin = -(static_cast<uword>(1) << (kBitsPerWord - 1))
constexpr

Definition at line 296 of file runtime_api.h.

◆ kWordSize

constexpr intptr_t dart::compiler::target::kWordSize = 1 << kWordSizeLog2
staticconstexpr

Definition at line 274 of file runtime_api.h.