| 81 | } |
| 82 | |
| 83 | void DataWalker::walk_variant ( char * ps, TypeInfo * ti ) { |
| 84 | if ( canVisitVariant(ps,ti) ) { |
| 85 | beforeVariant(ps, ti); |
| 86 | if ( cancel() ) return; |
| 87 | if (ti->argCount != 0) { |
| 88 | int32_t fidx = *((int32_t *)ps); |
| 89 | DAS_ASSERTF(uint32_t(fidx)<ti->argCount,"invalid variant index"); |
| 90 | int fieldOffset = getTypeBaseSize(Type::tInt); |
| 91 | TypeInfo * vi = ti->argTypes[fidx]; |
| 92 | auto fa = getTypeAlign(ti) - 1; |
| 93 | fieldOffset = (fieldOffset + fa) & ~fa; |
| 94 | char * pf = ps + fieldOffset; |
| 95 | if ( cancel() ) return; |
| 96 | walk(pf, vi); |
| 97 | if ( cancel() ) return; |
| 98 | } |
| 99 | afterVariant(ps, ti); |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | void DataWalker::walk_array ( char * pa, uint32_t stride, uint64_t count, TypeInfo * ti ) { |
| 104 | if ( !canVisitArrayData(ti,count) ) return; |
nothing calls this directly
no test coverage detected