Definition at line 25135 of file object.cc.
◆ Hash()
static uword dart::DefaultHashTraits::Hash |
( |
const Object & |
obj | ) |
|
|
inlinestatic |
Definition at line 25147 of file object.cc.
25147 {
25148 if (obj.IsNull()) {
25149 return 0;
25150 }
25151
25152
25155 Instance& hash_code = thread->InstanceHandle();
25156 hash_code ^= Instance::Cast(obj).HashCode();
25157 if (hash_code.IsSmi()) {
25158
25159 return static_cast<uword>(Smi::Cast(hash_code).AsTruncatedUint32Value());
25160 } else if (hash_code.IsInteger()) {
25161 return static_cast<uword>(
25162 Integer::Cast(hash_code).AsTruncatedUint32Value());
25163 } else {
25164 return 0;
25165 }
25166 }
static Thread * Current()
#define REUSABLE_INSTANCE_HANDLESCOPE(thread)
◆ IsMatch()
static bool dart::DefaultHashTraits::IsMatch |
( |
const Object & |
a, |
|
|
const Object & |
b |
|
) |
| |
|
inlinestatic |
Definition at line 25140 of file object.cc.
25140 {
25141 if (
a.IsNull() ||
b.IsNull()) {
25142 return (
a.IsNull() &&
b.IsNull());
25143 } else {
25144 return Instance::Cast(
a).OperatorEquals(Instance::Cast(
b));
25145 }
25146 }
◆ Name()
static const char * dart::DefaultHashTraits::Name |
( |
| ) |
|
|
inlinestatic |
Definition at line 25137 of file object.cc.
25137{ return "DefaultHashTraits"; }
◆ ReportStats()
static bool dart::DefaultHashTraits::ReportStats |
( |
| ) |
|
|
inlinestatic |
The documentation for this class was generated from the following file:
- third_party/dart-lang/sdk/runtime/vm/object.cc