I want to understand how calls to `new` for classes and structs are lowered by the compiler and druntime to a GC-allocation (specifically how the `ba`-argument bits are determined) followed by an initialization using default constructor or via a user-defined constructor called using arguments to `new`. And how this is related to the trait `hasElaborateConstructor` for both `classes` and `structs`.

I also want to understand how manually defined constructors and destructors affect the setting of the GC finalizer for a given aggregate type. And how this is related to the trait `hasElaborateDestructor` for both `classes` and `structs`.

Where's the dmd and druntime code that handles these steps?

Reply via email to