dmd.toobj: Move the toObjFile call in genTypeInfo to DMD gluelayer#13690
dmd.toobj: Move the toObjFile call in genTypeInfo to DMD gluelayer#13690ibuclaw wants to merge 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @ibuclaw! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#13690" |
a9b3fd6 to
0327da4
Compare
|
There's some funny things going on with type merging. But on closer inspection, |
61a32c5 to
f625ff5
Compare
|
Passes, but can be further simplified, as for instance |
f625ff5 to
341106e
Compare
| { | ||
| // Find module that will go all the way to an object file | ||
| Module m = sc._module.importedFrom; | ||
| m.members.push(t.vtinfo); |
There was a problem hiding this comment.
FWIW, I don't assign any TypeInfos here to modules anymore for LDC. Instead, I emit struct and ad-hoc TypeInfos into each referencing object file, solely from the glue layer. Besides potentially less inter-object-file dependencies and increased optimization potential, this also takes care of all CTFE / speculative instantiation problems.
Almost all code in typinf.d is common front-end semantic logic for all compilers, with exception to the
toObjFile()call into DMD's gluelayer.This moves that call to a new helper function
genTypeInfoForTypein the dmd-specific toobj.d module.With this, GDC no longer needs to patch any DMD front-end sources in order for it to work with the GCC glue.