Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
dart::kernel::InferredTypeMetadata Struct Reference

#include <kernel_translation_helper.h>

Public Types

enum  Flag {
  kFlagNullable = 1 << 0 , kFlagInt = 1 << 1 , kFlagSkipCheck = 1 << 2 , kFlagConstant = 1 << 3 ,
  kFlagReceiverNotInt = 1 << 4
}
 

Public Member Functions

 InferredTypeMetadata (intptr_t cid_, uint8_t flags_, const Object &constant_value_=Object::null_object())
 
bool IsTrivial () const
 
bool IsNullable () const
 
bool IsInt () const
 
bool IsSkipCheck () const
 
bool IsConstant () const
 
bool ReceiverNotInt () const
 
CompileType ToCompileType (Zone *zone, const AbstractType *static_type=nullptr, bool can_be_sentinel=false) const
 

Public Attributes

const intptr_t cid
 
const uint8_t flags
 
const Objectconstant_value
 

Static Public Attributes

static constexpr intptr_t kCompileTypeFlagsMask = kFlagNullable | kFlagInt
 

Detailed Description

Definition at line 1011 of file kernel_translation_helper.h.

Member Enumeration Documentation

◆ Flag

Enumerator
kFlagNullable 
kFlagInt 
kFlagSkipCheck 
kFlagConstant 
kFlagReceiverNotInt 

Definition at line 1012 of file kernel_translation_helper.h.

Constructor & Destructor Documentation

◆ InferredTypeMetadata()

dart::kernel::InferredTypeMetadata::InferredTypeMetadata ( intptr_t  cid_,
uint8_t  flags_,
const Object constant_value_ = Object::null_object() 
)
inline

Member Function Documentation

◆ IsConstant()

bool dart::kernel::InferredTypeMetadata::IsConstant ( ) const
inline

Definition at line 1041 of file kernel_translation_helper.h.

1041{ return (flags & kFlagConstant) != 0; }

◆ IsInt()

bool dart::kernel::InferredTypeMetadata::IsInt ( ) const
inline

Definition at line 1037 of file kernel_translation_helper.h.

1037 {
1038 return (flags & kFlagInt) != 0 || cid == kMintCid || cid == kSmiCid;
1039 }

◆ IsNullable()

bool dart::kernel::InferredTypeMetadata::IsNullable ( ) const
inline

Definition at line 1036 of file kernel_translation_helper.h.

1036{ return (flags & kFlagNullable) != 0; }

◆ IsSkipCheck()

bool dart::kernel::InferredTypeMetadata::IsSkipCheck ( ) const
inline

Definition at line 1040 of file kernel_translation_helper.h.

1040{ return (flags & kFlagSkipCheck) != 0; }

◆ IsTrivial()

bool dart::kernel::InferredTypeMetadata::IsTrivial ( ) const
inline

Definition at line 1032 of file kernel_translation_helper.h.

1032 {
1033 return (cid == kDynamicCid) &&
1035 }
@ kDynamicCid
Definition: class_id.h:253

◆ ReceiverNotInt()

bool dart::kernel::InferredTypeMetadata::ReceiverNotInt ( ) const
inline

Definition at line 1042 of file kernel_translation_helper.h.

1042{ return (flags & kFlagReceiverNotInt) != 0; }

◆ ToCompileType()

CompileType dart::kernel::InferredTypeMetadata::ToCompileType ( Zone zone,
const AbstractType static_type = nullptr,
bool  can_be_sentinel = false 
) const
inline

Definition at line 1046 of file kernel_translation_helper.h.

1048 {
1049 if (IsInt() && cid == kDynamicCid) {
1053 IsNullable(), can_be_sentinel);
1054 } else {
1055 return CompileType(IsNullable(), can_be_sentinel, cid, static_type);
1056 }
1057 }
static CompileType FromAbstractType(const AbstractType &type, bool can_be_null, bool can_be_sentinel)
static Object & ZoneHandle()
Definition: object.h:419
static TypePtr IntType()
static TypePtr NullableIntType()

Member Data Documentation

◆ cid

const intptr_t dart::kernel::InferredTypeMetadata::cid

Definition at line 1028 of file kernel_translation_helper.h.

◆ constant_value

const Object& dart::kernel::InferredTypeMetadata::constant_value

Definition at line 1030 of file kernel_translation_helper.h.

◆ flags

const uint8_t dart::kernel::InferredTypeMetadata::flags

Definition at line 1029 of file kernel_translation_helper.h.

◆ kCompileTypeFlagsMask

constexpr intptr_t dart::kernel::InferredTypeMetadata::kCompileTypeFlagsMask = kFlagNullable | kFlagInt
staticconstexpr

Definition at line 1021 of file kernel_translation_helper.h.


The documentation for this struct was generated from the following file: