comparison dmd/aggregate.h @ 8:5e69b77a5c51 trunk

[svn r12] fixed accessing aggregate fields of aggregates removed some useless branches for successive scopes ala {}{}{}
author lindquist
date Thu, 27 Sep 2007 06:03:06 +0200
parents c53b6e3fe49a
children 25bb577878e8
comparison
equal deleted inserted replaced
7:7a155ba88c53 8:5e69b77a5c51
15 #pragma once 15 #pragma once
16 #endif /* __DMC__ */ 16 #endif /* __DMC__ */
17 17
18 #include "root.h" 18 #include "root.h"
19 #include "dsymbol.h" 19 #include "dsymbol.h"
20
21 #include <vector>
20 22
21 struct Identifier; 23 struct Identifier;
22 struct Type; 24 struct Type;
23 struct TypeFunction; 25 struct TypeFunction;
24 struct Expression; 26 struct Expression;
95 97
96 bool llvmInProgress; 98 bool llvmInProgress;
97 llvm::Type* llvmType; 99 llvm::Type* llvmType;
98 llvm::Value* llvmVtbl; 100 llvm::Value* llvmVtbl;
99 llvm::Constant* llvmInitZ; 101 llvm::Constant* llvmInitZ;
100 virtual unsigned offsetToIndex(unsigned os); // converts a DMD field offsets to LLVM struct index 102 virtual void offsetToIndex(unsigned os, std::vector<unsigned>& result); // converts a DMD field offsets to LLVM struct index vector
101 103
102 AggregateDeclaration *isAggregateDeclaration() { return this; } 104 AggregateDeclaration *isAggregateDeclaration() { return this; }
103 }; 105 };
104 106
105 struct AnonymousAggregateDeclaration : AggregateDeclaration 107 struct AnonymousAggregateDeclaration : AggregateDeclaration
230 void toDt(dt_t **pdt); 232 void toDt(dt_t **pdt);
231 void toDt2(dt_t **pdt, ClassDeclaration *cd); 233 void toDt2(dt_t **pdt, ClassDeclaration *cd);
232 234
233 Symbol *vtblsym; 235 Symbol *vtblsym;
234 236
235 virtual unsigned offsetToIndex(unsigned os); 237 virtual void offsetToIndex(unsigned os, std::vector<unsigned>& result);
236 238
237 ClassDeclaration *isClassDeclaration() { return (ClassDeclaration *)this; } 239 ClassDeclaration *isClassDeclaration() { return (ClassDeclaration *)this; }
238 }; 240 };
239 241
240 struct InterfaceDeclaration : ClassDeclaration 242 struct InterfaceDeclaration : ClassDeclaration