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

Method getLookupHash

src/ast/ast_typedecl.cpp:498–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496 }
497
498 void TypeDecl::getLookupHash(uint64_t & hash) const {
499 hash = hashmix(hash, baseType);
500 hash = hashmix(hash, flagsWithoutAliasCache(this));
501 for ( auto d : dim ) {
502 hash = hashmix(hash, d);
503 }
504 if ( structType ) {
505 hash = hashmix(hash, intptr_t(structType));
506 } else if ( enumType ) {
507 hash = hashmix(hash, intptr_t(enumType));
508 } else if ( annotation ) {
509 hash = hashmix(hash, intptr_t(annotation));
510 }
511 if ( firstType ) {
512 firstType->getLookupHash(hash);
513 }
514 if ( secondType ) {
515 secondType->getLookupHash(hash);
516 }
517 if (baseType == Type::tBitfield || baseType == Type::tBitfield8 ||
518 baseType == Type::tBitfield16 || baseType == Type::tBitfield64 ||
519 baseType == Type::tVariant || baseType == Type::tTuple
520 ) {
521 for ( const auto & name : argNames ) {
522 hash = hashmix(hash, hash_block64(reinterpret_cast<const uint8_t *>(name.c_str()), name.size()));
523 }
524 }
525 for ( auto & argT : argTypes ) {
526 argT->getLookupHash(hash);
527 }
528 }
529
530 uint64_t TypeDecl::getSemanticHash() const {
531 HashBuilder hb;

Callers

nothing calls this directly

Calls 5

hashmixFunction · 0.85
flagsWithoutAliasCacheFunction · 0.85
hash_block64Function · 0.85
c_strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected