Minor comment on this and surrounding code -- this is a lot of boilerplate I suspect is more-or-less duplicated between the drc and null collector as well. It might be worth looking into at some point having various hooks into this process where a lot more of the boilerplate can be shared. For example inline allocations are probably completely different per collector but libcall-based allocations I suspect are almost exactly the same. Even calling init.initialize(...) and such is probably pretty similar would be my guess across collectors.
Not needed for now of course, but something that might be worth keeping in the back of our heads
Originally posted by @alexcrichton in #13107 (comment)
Minor comment on this and surrounding code -- this is a lot of boilerplate I suspect is more-or-less duplicated between the drc and null collector as well. It might be worth looking into at some point having various hooks into this process where a lot more of the boilerplate can be shared. For example inline allocations are probably completely different per collector but libcall-based allocations I suspect are almost exactly the same. Even calling
init.initialize(...)and such is probably pretty similar would be my guess across collectors.Not needed for now of course, but something that might be worth keeping in the back of our heads
Originally posted by @alexcrichton in #13107 (comment)