Definition at line 25056 of file object.cc.
◆ Hash()
static uword dart::DefaultHashTraits::Hash |
( |
const Object & |
obj | ) |
|
|
inlinestatic |
Definition at line 25068 of file object.cc.
25068 {
25069 if (obj.IsNull()) {
25070 return 0;
25071 }
25072
25073
25076 Instance& hash_code = thread->InstanceHandle();
25077 hash_code ^= Instance::Cast(obj).HashCode();
25078 if (hash_code.IsSmi()) {
25079
25080 return static_cast<uword>(Smi::Cast(hash_code).AsTruncatedUint32Value());
25081 } else if (hash_code.IsInteger()) {
25082 return static_cast<uword>(
25083 Integer::Cast(hash_code).AsTruncatedUint32Value());
25084 } else {
25085 return 0;
25086 }
25087 }
static Thread * Current()
#define REUSABLE_INSTANCE_HANDLESCOPE(thread)
◆ IsMatch()
static bool dart::DefaultHashTraits::IsMatch |
( |
const Object & |
a, |
|
|
const Object & |
b |
|
) |
| |
|
inlinestatic |
Definition at line 25061 of file object.cc.
25061 {
25062 if (
a.IsNull() ||
b.IsNull()) {
25063 return (
a.IsNull() &&
b.IsNull());
25064 } else {
25065 return Instance::Cast(
a).OperatorEquals(Instance::Cast(
b));
25066 }
25067 }
◆ Name()
static const char * dart::DefaultHashTraits::Name |
( |
| ) |
|
|
inlinestatic |
Definition at line 25058 of file object.cc.
25058{ 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