#include <canonical_tables.h>
Definition at line 337 of file canonical_tables.h.
◆ Hash()
uword dart::MetadataMapTraits::Hash |
( |
const Object & |
key | ) |
|
|
static |
Definition at line 61 of file canonical_tables.cc.
61 {
62 if (
key.IsLibrary()) {
64 }
else if (
key.IsClass()) {
66 }
else if (
key.IsFunction()) {
69 }
else if (
key.IsField()) {
72 }
else if (
key.IsTypeParameter()) {
73 return TypeParameter::Cast(
key).Hash();
74 }
else if (
key.IsNamespace()) {
76 }
78}
uint32_t CombineHashes(uint32_t hash, uint32_t other_hash)
◆ IsMatch()
bool dart::MetadataMapTraits::IsMatch |
( |
const Object & |
a, |
|
|
const Object & |
b |
|
) |
| |
|
static |
Definition at line 11 of file canonical_tables.cc.
11 {
12
13
14
15
16
17
18 if (
a.IsLibrary() &&
b.IsLibrary()) {
21 return url_a.Equals(url_b);
22 }
else if (
a.IsClass() &&
b.IsClass()) {
25 return name_a.Equals(name_b);
26 }
else if (
a.IsFunction() &&
b.IsFunction()) {
27 const auto& func_a = Function::Cast(
a);
28 const auto& func_b = Function::Cast(
b);
29 if (func_a.IsNonImplicitClosureFunction() ||
30 func_b.IsNonImplicitClosureFunction()) {
31 return a.ptr() ==
b.ptr();
32 }
35 if (!name_a.Equals(name_b)) {
36 return false;
37 }
40 return IsMatch(owner_a, owner_b);
41 }
else if (
a.IsField() &&
b.IsField()) {
44 if (!name_a.Equals(name_b)) {
45 return false;
46 }
49 return IsMatch(owner_a, owner_b);
50 }
else if (
a.IsTypeParameter() &&
b.IsTypeParameter()) {
51 if (TypeParameter::Cast(
a).index() != TypeParameter::Cast(
b).index() ||
52 TypeParameter::Cast(
a).
base() != TypeParameter::Cast(
b).
base()) {
53 return false;
54 }
55 return TypeParameter::Cast(
a).parameterized_class_id() ==
56 TypeParameter::Cast(
b).parameterized_class_id();
57 }
58 return a.ptr() ==
b.ptr();
59}
◆ Name()
static const char * dart::MetadataMapTraits::Name |
( |
| ) |
|
|
inlinestatic |
◆ ReportStats()
static bool dart::MetadataMapTraits::ReportStats |
( |
| ) |
|
|
inlinestatic |
The documentation for this class was generated from the following files: