| 272 | } |
| 273 | |
| 274 | static int getVariantSize ( TypeInfo * info ) { |
| 275 | int maxSize = 0; |
| 276 | int al = getVariantAlign(info) - 1; |
| 277 | for ( uint32_t i=0, is=info->argCount; i!=is; ++i ) { |
| 278 | int size = (getTypeBaseSize(Type::tInt) + al) & ~al; |
| 279 | size += getTypeSize(info->argTypes[i]); |
| 280 | maxSize = das::max(size, maxSize); |
| 281 | } |
| 282 | maxSize = (maxSize + al) & ~al; |
| 283 | return maxSize; |
| 284 | } |
| 285 | |
| 286 | int getVariantFieldOffset ( TypeInfo * info, int index ) { |
| 287 | DAS_ASSERT(info->type==Type::tVariant); |
no test coverage detected