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

Merge Master to NMirror - #1539

Merged
MichalStrehovsky merged 16 commits into
nmirrorfrom
master
Jul 18, 2016
Merged

MichalStrehovsky merged 16 commits into
nmirrorfrom
master

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

No description provided.

MichalStrehovsky and others added 16 commits July 13, 2016 10:33
Slight refactoring to make it possible to instantiate compilation group
outside of Compilation.

* I'm purposefully making it harder to root things outside of what's
allowed by making the class implementing ICompilationRootProvider
private. After initial roots are established, nobody should be rooting
anything. Everything needs to fall out of the graph.
* Fixing the reflection initialization root path to make it multifile
mode friendly
* Localizing the workaround that disables reflection on CppCodegen to
CppCodegen.
* Move compilation group creation out of Compilation
* Also, delete CompilationOptions that became unnecessary.
* Rename ICompilationRootProvider -> IRootingServiceProvider

We will likely want to split CompilationGroup into two classes in the
future (the logic that roots things is unrelated and we will likely want
to mix and match different roots with single/multifile policies).
Add a set of command line arguments that let us specify a single method
 to compile. This is useful when investigating code generation issues to
 help narrow down the focus and make it easier to set up breakpoints.

Fixes #1142.
Generic parameters will assert and it seems preferable for it to stay
that way.
* Canon is not variant.
* RuntimeDeterminedType has the same variance as the underlying canon
type (which probably means never variant either unless we allow variance
on generic structs)
Making this return a `MetadataType` was too eager. We don't need a
`MetadataType` and this actually became a hindrance because Canon types
don't derive off `MetadataType` and the code in JitInterface needs to be
able to handle them.
* Do not ask generic parameters if they're runtime determined

Generic parameters will assert and it seems preferable for it to stay
that way.

* Get variance information off of Canon/RuntimeDetermined types

* Canon is not variant.
* RuntimeDeterminedType has the same variance as the underlying canon
type (which probably means never variant either unless we allow variance
on generic structs)
This is needed for NgenDump RyuJIT option to work.
`NameMangler`'s job is to provide stable names for types and their
members. It doesn't have a connection with the compilation process and
therefore shouldn't depend on `Compilation`. This makes it reusable and
unit testable.

I'm also taking `CompilationUnitPrefix` away from it. It doesn't have a
logical connection (except that it's related to naming and it was
convenient to put it there). I'm putting it on NodeFactory temporarily,
but there is a strong correlation between a dependency node using
`CompiationUnitPrefix` in it's name and reporting
`ShouldShareNodeAcrossModules` as false. Maybe we should use that in
`ObjectWriter` to prepend it automatically instead of hoping the node
won't mess it up and jumping through hoops (a static variable) to get to
it.
Also, simplify the constructor of `InstantiatedMethodIL`.
- Expand Debug.DebugBreak as IL intrinsic
- Implement RhDebugBreak JIT helper for IL break instruction
- Switch assembly code to use RhDebugBreak to avoid C++ name mangling goo
- Change PalDebugBreak to be inline to avoid extra frames under debugger
- Cleanup some left-over cruft in Unix PAL
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.

4 participants