mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-13 02:13:14 +01:00
[svn r102] Further delayed emission of function bodies to avoid problems with circular-forward-references.
Now uses the DMD _adEq(void[], void[], TypeInfo) runtime function for array equality comparison.
This commit is contained in:
@@ -90,6 +90,14 @@ Module::genobjfile()
|
||||
dsym->toObjFile();
|
||||
}
|
||||
|
||||
// check if there are queued function definitions, if so process their bodies now
|
||||
if (!ir.funcQueue.empty()) {
|
||||
size_t n = ir.funcQueue.size();
|
||||
for (size_t i=0; i<n; ++i) {
|
||||
ir.funcQueue[i]->toObjFile();
|
||||
}
|
||||
}
|
||||
|
||||
// generate ModuleInfo
|
||||
genmoduleinfo();
|
||||
|
||||
@@ -480,7 +488,8 @@ void StructDeclaration::toObjFile()
|
||||
IRStruct::FuncDeclVector& mfs = gIR->topstruct().funcs;
|
||||
size_t n = mfs.size();
|
||||
for (size_t i=0; i<n; ++i) {
|
||||
mfs[i]->toObjFile();
|
||||
//mfs[i]->toObjFile();
|
||||
gIR->funcQueue.push_back(mfs[i]);
|
||||
}
|
||||
|
||||
llvmDModule = gIR->dmodule;
|
||||
@@ -693,7 +702,8 @@ void ClassDeclaration::toObjFile()
|
||||
IRStruct::FuncDeclVector& mfs = gIR->topstruct().funcs;
|
||||
size_t n = mfs.size();
|
||||
for (size_t i=0; i<n; ++i) {
|
||||
mfs[i]->toObjFile();
|
||||
//mfs[i]->toObjFile();
|
||||
gIR->funcQueue.push_back(mfs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user