Changeset 1054:a3d7288c4473
- 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
| r1051 |
r1054 |
|
| 154 | 154 | accum.addField(offset, Memory); |
|---|
| 155 | 155 | } else if (ty->ty == Tsarray) { |
|---|
| 156 | | d_uns64 eltsize = ty->next->size(); |
|---|
| | 156 | Type* eltType = ty->nextOf(); |
|---|
| | 157 | d_uns64 eltsize = eltType->size(); |
|---|
| 157 | 158 | if (eltsize > 0) { |
|---|
| 158 | 159 | d_uns64 dim = ty->size() / eltsize; |
|---|
| … | … | |
| 160 | 161 | && "Array of non-empty type <= 16 bytes but > 16 elements?"); |
|---|
| 161 | 162 | for (d_uns64 i = 0; i < dim; i++) { |
|---|
| 162 | | classifyType(accum, ty->next, offset); |
|---|
| | 163 | classifyType(accum, eltType, offset); |
|---|
| 163 | 164 | offset += eltsize; |
|---|
| 164 | 165 | } |
|---|