# HG changeset patch # User Frits van Bommel # Date 1236471990 -3600 # Node ID a3d7288c4473c36113fcf872237b511f07fb478c # Parent 11e28922ac76db142703dc74432a0436a8364887 Future-proof the code to classify static array members of structs. I made sure to create a merge conflict with the code attached to ticket #229 (which comments this code out due to changes in the DMD 'Type' type hierarchy) so that if it gets committed as-is there will be a human looking at it. diff -r 11e28922ac76 -r a3d7288c4473 gen/abi-x86-64.cpp --- a/gen/abi-x86-64.cpp Sun Mar 08 00:57:58 2009 +0100 +++ b/gen/abi-x86-64.cpp Sun Mar 08 01:26:30 2009 +0100 @@ -153,13 +153,14 @@ // the other types that can get bigger than 16 bytes accum.addField(offset, Memory); } else if (ty->ty == Tsarray) { - d_uns64 eltsize = ty->next->size(); + Type* eltType = ty->nextOf(); + d_uns64 eltsize = eltType->size(); if (eltsize > 0) { d_uns64 dim = ty->size() / eltsize; assert(dim <= 16 && "Array of non-empty type <= 16 bytes but > 16 elements?"); for (d_uns64 i = 0; i < dim; i++) { - classifyType(accum, ty->next, offset); + classifyType(accum, eltType, offset); offset += eltsize; } }