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

Method getOwnSemanticHash

src/ast/ast.cpp:241–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239 }
240
241 uint64_t Structure::getOwnSemanticHash(HashBuilder & hb, das_set<Structure *> & dep, das_set<Annotation *> & adep) const {
242 hb.updateString(getMangledName());
243 hb.update(fields.size());
244 for ( auto & fld : fields ) {
245 hb.updateString(fld.name);
246 hb.update(fld.type->getOwnSemanticHash(hb, dep, adep));
247 }
248 aliases.foreach([&](const TypeDeclPtr & atype) {
249 hb.update(atype->getOwnSemanticHash(hb, dep, adep));
250 return true;
251 });
252 return hb.getHash();
253 }
254
255 StructurePtr Structure::clone() const {
256 auto cs = new Structure(name);

Callers 1

updateSemanticHashMethod · 0.45

Calls 5

updateStringMethod · 0.80
updateMethod · 0.45
sizeMethod · 0.45
foreachMethod · 0.45
getHashMethod · 0.45

Tested by

no test coverage detected