Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::CidCheckerForRanges Class Reference
Inheritance diagram for dart::CidCheckerForRanges:
dart::ValueObject

Public Member Functions

 CidCheckerForRanges (Thread *thread, ClassTable *table, const Class &cls, bool include_abstract, bool exclude_null)
 
bool MayInclude (intptr_t cid)
 
bool MustInclude (intptr_t cid)
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Detailed Description

Definition at line 134 of file il.cc.

Constructor & Destructor Documentation

◆ CidCheckerForRanges()

dart::CidCheckerForRanges::CidCheckerForRanges ( Thread thread,
ClassTable table,
const Class cls,
bool  include_abstract,
bool  exclude_null 
)
inline

Definition at line 136 of file il.cc.

141 : thread_(thread),
142 table_(table),
143 supertype_(AbstractType::Handle(zone(), cls.RareType())),
144 include_abstract_(include_abstract),
145 exclude_null_(exclude_null),
146 to_check_(Class::Handle(zone())),
147 subtype_(AbstractType::Handle(zone())) {}
SI F table(const skcms_Curve *curve, F v)
static Object & Handle()
Definition: object.h:407

Member Function Documentation

◆ MayInclude()

bool dart::CidCheckerForRanges::MayInclude ( intptr_t  cid)
inline

Definition at line 149 of file il.cc.

149 {
150 if (!table_->HasValidClassAt(cid)) return true;
151 if (cid == kTypeArgumentsCid) return true;
152 if (cid == kVoidCid) return true;
153 if (cid == kDynamicCid) return true;
154 if (cid == kNeverCid) return true;
155 if (!exclude_null_ && cid == kNullCid) return true;
156 to_check_ = table_->At(cid);
157 ASSERT(!to_check_.IsNull());
158 if (!include_abstract_ && to_check_.is_abstract()) return true;
159 return to_check_.IsTopLevel();
160 }
ClassPtr At(intptr_t cid) const
Definition: class_table.h:362
bool HasValidClassAt(intptr_t cid) const
Definition: class_table.h:386
bool is_abstract() const
Definition: object.h:1696
bool IsTopLevel() const
Definition: object.cc:6121
bool IsNull() const
Definition: object.h:363
#define ASSERT(E)
@ kNullCid
Definition: class_id.h:252
@ kVoidCid
Definition: class_id.h:254
@ kDynamicCid
Definition: class_id.h:253
@ kNeverCid
Definition: class_id.h:255
const intptr_t cid

◆ MustInclude()

bool dart::CidCheckerForRanges::MustInclude ( intptr_t  cid)
inline

Definition at line 162 of file il.cc.

162 {
164 if (cid == kNullCid) return false;
165 to_check_ = table_->At(cid);
166 subtype_ = to_check_.RareType();
167 // Create local zone because deep hierarchies may allocate lots of handles.
168 StackZone stack_zone(thread_);
169 HANDLESCOPE(thread_);
170 return subtype_.IsSubtypeOf(supertype_, Heap::kNew);
171 }
bool IsSubtypeOf(const AbstractType &other, Heap::Space space, FunctionTypeMapping *function_type_equivalence=nullptr) const
Definition: object.cc:21550
bool MayInclude(intptr_t cid)
Definition: il.cc:149
TypePtr RareType() const
Definition: object.cc:3036
@ kNew
Definition: heap.h:38
#define HANDLESCOPE(thread)
Definition: handles.h:321

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