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

Merge master to nmirror - #1601

Merged
jkotas merged 37 commits into
nmirrorfrom
master
Jul 29, 2016
Merged

jkotas merged 37 commits into
nmirrorfrom
master

Conversation

@jkotas

@jkotas jkotas commented Jul 29, 2016

Copy link
Copy Markdown
Member

No description provided.

nattress and others added 30 commits July 18, 2016 10:50
Fix NullReferenceException in MetadataVirtualMethodAlgorithm.FindBaseUnificationGroup where the separateMethods variable is constructed on demand and later assumed to have an instance when it's possible it won't.
Add regression test
* Add base class for flexible type name formatting
* Improve MethodILDebugView formatting - instead of relying on `ToString`,
format things similarly to what ILDasm would show.
* Change the `ILDisassembler` class to handle all of the token
resolution by itself. There's little point in having this pluggable.
* Add a unit test to test the disassembly.
Fix NullReferenceException in VTable computation
Since the HelperParamRef/In intrinsics are currently faked as being
member methods of the delegate itself (they have ByRef return values and
can't be expressed as a C# method we could put `[Intrinsic]` on), they
need to be instantiated as open before being called from the referenced
code. RyuJIT apparently doesn't care, but CppCodeGen is more sensitive.
`_ecvt_s` is already defined in the C headers we include, but with a
slightly different signature. I wanted to group this hack together with
the other `TODO: hacky special-case`, but not emitting the declaration
doesn't fix this either because the signature is incompatible. This will
do the job.
There's little point in separating type initialization manager from the
type system context. It's an extra class we need to instantiate and pass
around between Compilation and NodeFactory and doesn't provide much
functionality to warrant being a separate class (we don't expect this to
be more pluggable/overridable than the type system context in general -
we might want to consider a middle man class between
MetadataTypeSystemContext and CompilerTypeSystemContext if pluggability
is desired).

Also, exposing CompilerTypeSystemContext on NodeFactory is more useful.
The motivation for this change is:
* To make the type name formatter general purpose (it can now handle
`NoMetadata` types)
* To make `NameMangler` able to mangle canon types and runtime
determined types without special casing

For situation where we have a NoMetadataType, the expectation is that
we're asking for the name for diagnostic purposes only (i.e. name
formatter wants it). In that case:
* In checked builds, the name can actually be retrieved from diagnostic
mapping tables, along with the owning type (we have a metadata TypeRef
for this).
* In the absence of diagnostic mapping tables, the name can be faked up
and the type pretended to be non-nested
("System.Runtime.NoMetadataTypes.EEType1234ABCD")

As an additional change, I'm also adding `Name` property on
`GenericParameterDesc`. We can compute a useful fallback value for this
in absence of metadata ("T" + index).
This is how UniversalCanon is reported on the .NET Native for UWP
compiler. We should align. As a nice side effect, IsDefType is now a
valid thing to call on canonical types.
I went through the places in the runtime that access
`RelatedParameterType` as part of looking at issue #88. This is the only
thing I found. If there's anything else lurking, we'll find it in
testing.

Fixes #88.
This makes signature variables easier to handle in various double
dispatch scenarios.
)

Hard cast to `MetadataType` is unnecessary. Treat DefTypes not deriving
from MetadataType as not having a home assembly.
- Cosmetic changes in gc.cpp
- Replaced bit-rotten code in gc/sample/gcenv.unix.cpp with TODO
There are several node kinds that will be different depending on the
compilation backend. Factor them out into separate classes to remove
usage of `isCppCodegen`.

The base `NodeFactory` is only allowed to do tasks that are common
across codegens now.

We might want a `TestNodeFactory` in the future for unit testing.

I'll follow up with splitting `NodeFactory` into one more abstract layer
(to e.g. make `AttachToDependecyGraph` abstract and to take out things
like `HelperEntrypoint(...)`).
This is unused and it's an assembly stub referenced from `NodeFactory`,
hence verboten.
* If user forgets to call `SetSystemModule`, make sure
`GetWellKnownType` will fail (instead of returning `null` that will
nullref sometime later).
* Allow `EcmaModule` to resolve type references in non-ECMA modules and
types.
jkotas and others added 7 commits July 28, 2016 14:19
The equivalent compiler built-in function is __builtin_trap().
…1598)

This is really something I should have done in #1582, but I didn't look
at the whole file.
Cleanup string ctors + Update RyuJIT version
CompilationModuleGroup wasn't doing any checks. Pulled the logic out
into a separate property and added checks.
@jkotas
jkotas merged commit 024d73c into nmirror Jul 29, 2016
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.

6 participants