Flutter Engine
The Flutter Engine
Static Public Member Functions | List of all members
dart::DispatcherTraits 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 DispatcherKey &key, const Object &obj)
 
static uword Hash (const Object &key)
 
static uword Hash (const DispatcherKey &key)
 
static ObjectPtr NewKey (const DispatcherKey &key)
 

Detailed Description

Definition at line 365 of file canonical_tables.h.

Member Function Documentation

◆ Hash() [1/2]

static uword dart::DispatcherTraits::Hash ( const DispatcherKey key)
inlinestatic

Definition at line 385 of file canonical_tables.h.

385{ return key.Hash(); }

◆ Hash() [2/2]

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

Definition at line 381 of file canonical_tables.h.

381 {
382 const Function& func = Function::Cast(key);
383 return CombineHashes(String::Hash(func.name()), func.kind());
384 }
uword Hash() const
Definition: object.h:10216
uint32_t CombineHashes(uint32_t hash, uint32_t other_hash)
Definition: hash.h:12

◆ IsMatch() [1/2]

static bool dart::DispatcherTraits::IsMatch ( const DispatcherKey key,
const Object obj 
)
inlinestatic

Definition at line 378 of file canonical_tables.h.

378 {
379 return key.Equals(Function::Cast(obj));
380 }

◆ IsMatch() [2/2]

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

Definition at line 371 of file canonical_tables.h.

371 {
372 const Function& a_func = Function::Cast(a);
373 const Function& b_func = Function::Cast(b);
374 return (a_func.name() == b_func.name()) &&
375 (a_func.kind() == b_func.kind()) &&
376 (a_func.saved_args_desc() == b_func.saved_args_desc());
377 }
static bool b
struct MyStruct a[10]

◆ Name()

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

Definition at line 367 of file canonical_tables.h.

367{ return "DispatcherTraits"; }

◆ NewKey()

static ObjectPtr dart::DispatcherTraits::NewKey ( const DispatcherKey key)
inlinestatic

Definition at line 386 of file canonical_tables.h.

386{ UNREACHABLE(); }
#define UNREACHABLE()
Definition: assert.h:248

◆ ReportStats()

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

Definition at line 368 of file canonical_tables.h.

368{ return false; }

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