Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Place CppCodegen in a separate assembly - #3468

Merged
MichalStrehovsky merged 2 commits into
dotnet:masterfrom
MichalStrehovsky:splitCppCodegen
May 2, 2017
Merged

MichalStrehovsky merged 2 commits into
dotnet:masterfrom
MichalStrehovsky:splitCppCodegen

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

This is useful for general code hygiene (maybe we should do the same
with RyuJIT and UTC specific stuff), but what forced my hand to do this
now is that we would like to use ILImporter for things other than
importing for CppCodegen.

ILImporter is a partial class and its reusability depends on users
providing a different part file for the reusable portion. This makes the
class essentially incompatible with any other IL importer implementation
in the same assembly.

I looked into making ILImporter reusable, while maintaining the same
perf characteristics (no virtual calls on importing each instruction),
but I couldn't find a scheme where it still made sense.

Maybe we'll end up making the class reusable at some point and absorb
the perf hit, but this pull request has a leg to stand on on it's own.

This is useful for general code hygiene (maybe we should do the same
with RyuJIT and UTC specific stuff), but what forced my hand to do this
now is that we would like to use `ILImporter` for things other than
importing for CppCodegen.

`ILImporter` is a partial class and its reusability depends on users
providing a different part file for the reusable portion. This makes the
class essentially incompatible with any other IL importer implementation
in the same assembly.

I looked into making `ILImporter` reusable, while maintaining the same
perf characteristics (no virtual calls on importing each instruction),
but I couldn't find a scheme where it still made sense.

Maybe we'll end up making the class reusable at some point and absorb
the perf hit, but this pull request has a leg to stand on on it's own.
Comment thread src/packaging/packages.targets Outdated
<!-- IL.Compiler target files -->
<ILCompilerFiles Include="ilc.dll" />
<ILCompilerFiles Include="ILCompiler.Compiler.dll" />
<ILCompilerFiles Include="ILCompiler.Compiler.Cpp.dll" />

@jkotas jkotas May 2, 2017 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Having Compiler twice in the name looks odd. Would ILCompiler.Cpp.dll or ILCompiler.CppCodeGen.dll look better?

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants