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

Method propagateAt

src/ast/ast_unused.cpp:120–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118 }
119 protected:
120 void propagateAt ( ExprAt * at ) {
121 if ( at->subexpr->type->isHandle() && at->subexpr->type->annotation->isIndexMutable(at->index->type) ) {
122 propagateWrite(at->subexpr);
123 } else if ( at->subexpr->type->isGoodTableType() ) {
124 propagateWrite(at->subexpr); // note: this makes it so tab[foo] modifies itself
125 } else {
126 propagateRead(at->subexpr);
127 }
128 propagateRead(at->index);
129 }
130 bool isConstCast ( const TypeDeclPtr & td ) const {
131 if ( td->constant ) return true; // cast<foo const> is const
132 if ( td->baseType==Type::tPointer ) {

Callers

nothing calls this directly

Calls 3

isHandleMethod · 0.80
isGoodTableTypeMethod · 0.80
isIndexMutableMethod · 0.45

Tested by

no test coverage detected