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

Method walk_tuple

src/simulate/simulate_gc.cpp:559–576  ·  view source on GitHub ↗

extended version, with entry callbacks

Source from the content-addressed store, hash-verified

557
558 // extended version, with entry callbacks
559 virtual void walk_tuple ( char * ps, TypeInfo * ti ) override {
560 if ( canVisitTuple(ps,ti) ) {
561 beforeTuple(ps, ti);
562 int fieldOffset = 0;
563 for ( uint32_t i=0, is=ti->argCount; i!=is; ++i ) {
564 bool last = i==(ti->argCount-1);
565 TypeInfo * vi = ti->argTypes[i];
566 auto fa = getTypeAlign(vi) - 1;
567 fieldOffset = (fieldOffset + fa) & ~fa;
568 char * pf = ps + fieldOffset;
569 beforeTupleEntry(ps, ti, pf, i, last);
570 walk(pf, vi);
571 afterTupleEntry(ps, ti, pf, i, last);
572 fieldOffset += vi->size;
573 }
574 afterTuple(ps, ti);
575 }
576 }
577
578 virtual void walk_struct ( char * ps, StructInfo * si ) override {
579 if ( ps && (si->flags & StructInfo::flag_class) ) {

Callers

nothing calls this directly

Calls 7

canVisitTupleFunction · 0.85
beforeTupleFunction · 0.85
getTypeAlignFunction · 0.85
beforeTupleEntryFunction · 0.85
walkFunction · 0.85
afterTupleEntryFunction · 0.85
afterTupleFunction · 0.85

Tested by

no test coverage detected