MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / getOwnSemanticHash

Method getOwnSemanticHash

src/ast/ast_handle.cpp:20–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18 }
19
20 uint64_t BasicStructureAnnotation::getOwnSemanticHash ( HashBuilder & hb, das_set<Structure *> & dep, das_set<Annotation *> & adep ) const {
21 hb.updateString(getMangledName());
22 size_t idx = 0;
23 for ( const auto & fname : fieldsInOrder ) {
24 auto & sfield = fields.find(fname)->second;
25 hb.updateString(sfield.name);
26 hb.update(idx++);
27 if ( sfield.constDecl ) {
28 hb.update(sfield.constDecl->getOwnSemanticHash(hb,dep,adep));
29 }
30 if ( sfield.decl ) {
31 hb.update(sfield.decl->getOwnSemanticHash(hb,dep,adep));
32 }
33 }
34 return hb.getHash();
35 }
36
37 bool BasicStructureAnnotation::hasStringData(das_set<void *> & dep) const {
38 for ( auto & it : fields ) {

Callers

nothing calls this directly

Calls 4

updateStringMethod · 0.80
findMethod · 0.45
updateMethod · 0.45
getHashMethod · 0.45

Tested by

no test coverage detected