Mercurial > projects > ldc
comparison dmd/func.c @ 1228:79758fd2f48a
Added Doxygen file.
Completely seperated type and symbol generation. Should fix a lot of bugs, but is not yet 100% complete.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Wed, 15 Apr 2009 20:06:25 +0200 |
parents | e961851fb8be |
children | 680b4df0ea36 |
comparison
equal
deleted
inserted
replaced
1215:08f87d8cd101 | 1228:79758fd2f48a |
---|---|
82 | 82 |
83 #if IN_LLVM | 83 #if IN_LLVM |
84 // LDC | 84 // LDC |
85 isArrayOp = false; | 85 isArrayOp = false; |
86 allowInlining = false; | 86 allowInlining = false; |
87 | |
88 // function types in ldc don't merge if the context parameter differs | |
89 // so we actually don't care about the function declaration, but only | |
90 // what kind of context parameter it has. | |
91 // however, this constructor is usually called from the parser, which | |
92 // unfortunately doesn't provide the information needed to get to the | |
93 // aggregate type. So we have to stick with the FuncDeclaration and | |
94 // just be sure we don't actually rely on the symbol it points to, | |
95 // but rather just the type of its context parameter. | |
96 // this means some function might have a function type pointing to | |
97 // another function declaration | |
98 | |
99 if (type) | |
100 { | |
101 assert(type->ty == Tfunction && "invalid function type"); | |
102 TypeFunction* tf = (TypeFunction*)type; | |
103 if (tf->funcdecl == NULL) | |
104 tf->funcdecl = this; | |
105 } | |
87 #endif | 106 #endif |
88 } | 107 } |
89 | 108 |
90 Dsymbol *FuncDeclaration::syntaxCopy(Dsymbol *s) | 109 Dsymbol *FuncDeclaration::syntaxCopy(Dsymbol *s) |
91 { | 110 { |