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

Merge master to nmirror - #1260

Merged
jkotas merged 30 commits into
nmirrorfrom
master
May 9, 2016
Merged

jkotas merged 30 commits into
nmirrorfrom
master

Conversation

@jkotas

@jkotas jkotas commented May 9, 2016

Copy link
Copy Markdown
Member

No description provided.

MichalStrehovsky and others added 30 commits May 2, 2016 21:22
…1230)

If we can't find an implementation of the Finalize method in the
hierarchy, the type hierarchy starts with something weird.

Marking as TODO because we still need to standardize on what exception
types to throw and how to throw them.
This includes:
* The algorithm to compute a pointer map for object instances, GC static regions and thread static regions.
* A data structure to hold the pointer map in a compact form.
* Emit instance field GCDescs
* Compat shim to emit GCStatic region EETypes with real GCDescs
This change modifies PAL_LIMITED_CONTEXT, StackFrameIterator and REGDISPLAY
structs and also all related code accessing registers that are not present
for Unix.
This change ports AMD64 ExceptionHandling.asm and ManagedCalloutThunk.asm to
Unix.
Implement Unix AMD64 EH assembler helpers
Work to resolve PInvoke entrypoints lazily. This enables us to support programs that have platform-specific light up behaviors (call platform APIs depending on the platform they are native-compiled for). It also removes the need to supply import libraries when linking the OBJ files (which is super convenient because managed developers are not used to it).

* Generate a managed body for all PInvoke methods
* Get rid of PInvoke jump stubs
* Route CppCodegen RVA data handling the same as JIT
* Lazy PInvoke resolution
* Lazy PInvoke Unix support scaffolding
Use Array.Empty in a few places
* Pull out `GCDescEncoder` into a separate struct so that it can be shared with `GCStaticEETypeNode`.
* Get `GCStaticEETypeNode` into using it.

Fixes #1239.
This can't be encoded in the EEType (and in the array GCDescs, for that
matter).

I'm removing checked arithmetic from the GCDesc encoder because that
code runs before ComponentSize emission, but it's not the right place to
check for this, because this also applies to value types with no GC
pointers.
/tmp/pkgsrc-tmp/wip/corert-git/work/corert/src/Native/Bootstrap/../gc/env/gcenv.base.h:27:9:
error: 'SIZE_T_MAX' macro redefined [-Werror,-Wmacro-redefined]
        ^
/usr/include/machine/limits.h:72:9: note: previous definition is here
        ^
1 error generated.
* `!arrayType.ElementType.IsValueType` doesn't mean the type has GC
pointers (unmanaged pointers don't, for example)
* `HasVariance` check was unnecessarily going to the definition. This is
not wrong, just unnecessary and confusing.
I looked at `DispatchMapEntry` in the context of issue #249 (make fields
readonly), but it seems better to just remove the struct and unnecessary
allocations.
Seems like the reason for using `Contract.Assert` instead of
`Debug.Assert` in the startup path was that `Debug.Assert` won't work
because it's not low level enough (needs `String.Empty` to work).
`Contract.Assert` is still problematic when the condition is not met.

The right solution is to actually define a lower level Assert.
Forgot to put it in the `Internal.IL.Stubs` namespace. Ooops.
* Align `Relocation` struct with our conventions

* Align `AddrMode` struct with our conventions

* Align `ILLocalVariable` struct with our conventions

* Align `ILExceptionRegion` struct with our conventions
@jkotas
jkotas merged commit 1093714 into nmirror May 9, 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