Flutter Engine
The Flutter Engine
Static Public Member Functions | List of all members
dart::CanonicalTypeTraits Class Reference

#include <canonical_tables.h>

Static Public Member Functions

static const char * Name ()
 
static bool ReportStats ()
 
static bool IsMatch (const Object &a, const Object &b)
 
static bool IsMatch (const CanonicalTypeKey &a, const Object &b)
 
static uword Hash (const Object &key)
 
static uword Hash (const CanonicalTypeKey &key)
 
static ObjectPtr NewKey (const CanonicalTypeKey &obj)
 

Detailed Description

Definition at line 150 of file canonical_tables.h.

Member Function Documentation

◆ Hash() [1/2]

static uword dart::CanonicalTypeTraits::Hash ( const CanonicalTypeKey key)
inlinestatic

Definition at line 170 of file canonical_tables.h.

170{ return key.Hash(); }

◆ Hash() [2/2]

static uword dart::CanonicalTypeTraits::Hash ( const Object key)
inlinestatic

Definition at line 166 of file canonical_tables.h.

166 {
167 ASSERT(key.IsType());
168 return Type::Cast(key).Hash();
169 }
#define ASSERT(E)

◆ IsMatch() [1/2]

static bool dart::CanonicalTypeTraits::IsMatch ( const CanonicalTypeKey a,
const Object b 
)
inlinestatic

Definition at line 162 of file canonical_tables.h.

162 {
163 ASSERT(b.IsType());
164 return a.Matches(Type::Cast(b));
165 }
static bool b
struct MyStruct a[10]

◆ IsMatch() [2/2]

static bool dart::CanonicalTypeTraits::IsMatch ( const Object a,
const Object b 
)
inlinestatic

Definition at line 156 of file canonical_tables.h.

156 {
157 ASSERT(a.IsType() && b.IsType());
158 const Type& arg1 = Type::Cast(a);
159 const Type& arg2 = Type::Cast(b);
160 return arg1.Equals(arg2) && (arg1.Hash() == arg2.Hash());
161 }

◆ Name()

static const char * dart::CanonicalTypeTraits::Name ( )
inlinestatic

Definition at line 152 of file canonical_tables.h.

152{ return "CanonicalTypeTraits"; }

◆ NewKey()

static ObjectPtr dart::CanonicalTypeTraits::NewKey ( const CanonicalTypeKey obj)
inlinestatic

Definition at line 171 of file canonical_tables.h.

171 {
172 return obj.key_.ptr();
173 }

◆ ReportStats()

static bool dart::CanonicalTypeTraits::ReportStats ( )
inlinestatic

Definition at line 153 of file canonical_tables.h.

153{ return false; }

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