Commit graph

4 commits

Author SHA1 Message Date
David Nadlinger
9700d84132 Initialize IrTypeAggr members in order to silence warning. 2013-06-17 02:38:38 +02:00
David Nadlinger
a0ffaf56bf Do not codegen aggregate types from within debug info generation.
This avoids problems where we would codegen children of an
"inner" template instantiation (i.e. a member of a non-template
aggregate in another module) because we have no way to know the
outer (declare-only) entity exists in the respective
mustDefineSymbol invocation.

An example for this are the std.typecons.RefCounted internals of
std.file.DirIterator, as used from std.datetime and other modules.
This is not only inefficient, but also causes linking issues due
to attribute inference for these functions not having run yet
(and consequently the mangled name being different from the
actual definition).
2013-06-16 19:33:04 +02:00
David Nadlinger
9a016a1002 Refactor struct initializers codegen.
This not only reduces code duplication, but the unification
also enables code a la StructLiteralExp to handle classes
(for CTFE class constant support in 2.063).
2013-06-12 20:16:05 +02:00
David Nadlinger
2cebe6408c Divided ir/irtypestruct.* in general aggregate and struct specific part.
This is just to improve clarity, as it was rather non-obvious
what of the code also applied to classes before.

IrTypeAggr::createInitializerConstant would currently belong in
IrTypeStruct, but this will be refactored anyway.
2013-06-12 17:17:09 +02:00