Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Changeset 1054:a3d7288c4473

Show
Ignore:
Timestamp:
03/07/09 19:26:30 (3 years ago)
Author:
Frits van Bommel <fvbommel wxs.nl>
Children:

1055:5066ba0c9783 1056:cc723604da95

branch:
default
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gen/abi-x86-64.cpp

    r1051 r1054  
    154154            accum.addField(offset, Memory); 
    155155        } else if (ty->ty == Tsarray) { 
    156             d_uns64 eltsize = ty->next->size(); 
     156            Type* eltType = ty->nextOf(); 
     157            d_uns64 eltsize = eltType->size(); 
    157158            if (eltsize > 0) { 
    158159                d_uns64 dim = ty->size() / eltsize; 
     
    160161                        && "Array of non-empty type <= 16 bytes but > 16 elements?"); 
    161162                for (d_uns64 i = 0; i < dim; i++) { 
    162                     classifyType(accum, ty->next, offset); 
     163                    classifyType(accum, eltType, offset); 
    163164                    offset += eltsize; 
    164165                } 
Copyright © 2008, LDC Development Team.