This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Conversation
…rked when ILCompiler.DependencyAnalysis.RyuJitNodeFactory is MarkingComplete (#3227)
[tfs-changeset: 1653409]
Fix #2588 Port of SymCryptMarvin32() from marvin.cpp. https://github.com/dotnet/coreclr/blob/master/src/vm/marvin32.cpp#L219 - Tested on various seeds and data arrays up to 30 bytes long. (test data obtained by hacking CoreCLR to get test data with deterministic seeds.) - s0/s1 renamed to p0/p1 (for more consistency with algorithm description in patent.) - Verified that NUTC generates fully inlined code for Marving.ComputeHashString() (including reducing _rotl to rol or ror.) - Marvin specifies interpreting bytes in little-endian fashion - if this code ever runs on a big-endian machine, the result is probably not Marvin (though I can see how it's any less useful for the way we use it.) - This is not turned on by default (we don't yet have a switch to turn on randomized string hashing in CoreRT).
Extract portable/managed code from Array for sharing with Mono and CoreCLR
Merge changes from TFS
[tfs-changeset: 1653426]
Merge changes from TFS
[tfs-changeset: 1653494]
[tfs-changeset: 1653496]
ObjectInvariant - an obsolete method for supporting contracts... CreateWaitHandle - not too useful by itself, but I assume this was meant to be overridden by something more useful. Synchronized - creates SyncStream. - Keeping Stream structured the same as the CoreCLR version. Not going to attempt to share this as there still lots of scary looking async differences. I'll leave this to the area owner.
Merge changes from TFS
[tfs-changeset: 1653504]
Merge changes from TFS
Michal added concept of prefix mangled type/method couple of days ago which enables us to add managled name for delegate and struct marshalling stubs.
As part of NetStandard2.0 work, this change ports CoreCLR System.Diagnostics.Debug API's to CoreRT / .NET Native. I'm moving the main file Debug.cs to the shared partition - integrating this change to CoreCLR will require an additional commit to modify the mscorlib build project. [tfs-changeset: 1653520]
Add mangled names for delegate and struct marshalling stubs
Fix array of non-blittable structs marshalling
Merge nmirror to master
Merge changes from TFS
- When referencing a method outside of the current module, the ReflectionInvokeMapNode should reference via a method name and signature in the native layout, not a metadata token - When referencing a field outside of the current module, the ReflectionFieldMapNode should reference via method name not token - When emitting a reference to a indirection cell in the ExternalReferencesTableNode use the calculate delta instead of throwing away the calculation - When producing GCStatic descs for canonical types for the purpose of the template type loader, they should not be grouped into a single GC Static Desc region, but instead should be held in separate standalone regions - Update the PrecomputedMetadataManager to take advantage of the new ReflectionInvokeMapNode functionality - Disable new functionality for field mapping, as that requires cross module static import which isn't yet completely implemented - Disable the use of the dynamic invoke tables. The dependency analysis interactions are still not quite right in this scenario - When producing Thread Static GC descs, use a section relative reloc to the TypeThreadStaticsSymbol, not the start of the tls section - Remove all plumbing around the start of tls section and the ReadyToRun header - The need for the data was incorrect, and the data is not useful [tfs-changeset: 1653533]
Merge changes from TFS
This will be taking similar code paths as multidimensional arrays - the arrays of pointers don't have anything "interesting" in the EEType and should mostly just pass through.
This change gets the System.Text.Encoder, Decoder, and EncodingInfo types to match N 2.0 surface area. Encoder.cs and Decoder.cs have been changed to be very similar to the CoreCLR versions, in anticipation of a move to the Shared partition.
The change also addresses some but not all of the NS2.0 discrepancies in System.Text.Encoding. The following APIs have not been ported:
BodyName
HeaderName
IsBrowserDisplay
IsBrowserSave
IsMailNewsDisplay
IsMailNewsSave
WindowsCodePage
[tfs-changeset: 1653566]
Merge changes from TFS
Merge nmirror to master
…#3246) This is the CoreRT half of dotnet/coreclr#10775 This also replaces "SetErrorCode()" with "HResult =" to match the prevailing practice.
Merge nmirror to master
Change Description:
For Pinvoke function, Currently Mcg will try to resolve its 'real' native exported function name through lib file. This add a hard dependency on Lib files to allow pinvoke works correctly
If one of its lib file doesn't exists,
if UseDefaultPInvoke is set, then the app may fail to launch
if UseDefaultPInvoke isn't set, then throw exception if someone try to call this function during runtime.
The change will to use LoadLibrary/GetProcAddress to fetch native function during runtime when passing IFS:UseLoadLibraryForPInvoke to ilc.
Also since it isn't clear whether Windows will allow to use LoadLibrary/GetProcAddress in UWP, so add LoadLibrary/GetProcAddress support code into Mcg Code template
Changes:
1. Move McgGeneratedNativeCallCodeAttribute from S.P.Interop to S.P.Corelib
The LoadLibray/GetProcAddress support itself need to call some pinvokes(CoTaskMemAlloc/CoTaskMemFree), thus Mcg should skip these these pinvokes(CoTaskMemAlloc/CoTaskMemFree).
2. Add IFS:UseLoadLibraryForPInvoke to enable LoadLibrary Support. By default, don't use LoadLibrary
3. Add EntryPointNotFoundException and DllNotFoundException as wellknown type, since mcg generated code depends on these two types
Remaining:
1. Stdcall convention support for missing lib case
[tfs-changeset: 1655835]
Merge changes from TFS
Throw NotSupportedException instead of NotImplementedException so it is caught by the code that inserts a throwing method body when interop IL generation fails.
I found the problem with filter funclets is that the untracked variables get reported both by the filter funclet and the enclosing method. While the compiler makes sure that the lifetimes of other variables get appropriately split and marked as pinned, this is not the case for untracked variables - here we simply need to suppress the reporting if we are indeed in a filter funclet. My fix simply figures out whether we are indeed in a filter, and if so, passes an appropriate flag to EnumerateLiveSlots. I suspect that UnixNativeCodeManager.cpp/.h will need a parallel fix, but lets first discuss whether my fix for Windows is in fact correct.
…l definition" (For a quick intro on what I'm doing here, look at the changes in the object writer.) The `Offset` property on `ISymbolNode` used to mean "the offset from the beginning of the `ObjectNode` that defines this `ISymbolNode`". This means that when referring to a symbol defined elsewhere, the `Offset` property was unused - it was only used when the `ISymbolNode` meant "definition". We found out very early in our CoreRT multi module effort that the existing structure where `ISymbolNode` is both a definition and a reference is very awkward. COMDAT sections can only define a single symbol, but we would like to refer to multiple things within the object node package. We have a bunch of places where the inability of having a node that represents "symbol+delta" leads to awkward code that needs to pass the delta separately. With this change I'm introducing a `ISymbolDefinitionNode`. The new world looks like this: * `ISymbolDefinitionNode.Offset` means "the offset from the beginning of object data where the symbol should be defined". * `ISymbolNode.Offset` now means "the delta from symbol with this name". Whoever implements `ISymbolDefinitionNode` should also implement `ISymbolNode`, so that the symbol can be used as a reference. I chose to name both of the properties `Offset`, because it makes implementing the common case (Offset = 0) require less boilerplate. As an example where this can be used (I'm not doing it now to keep the diffs as small as possible) is the `NonGCStaticsNode`: with this infrastructure in place, we can now have a separate `ISymbolNode` for the cctor context that doesn't define a new symbol, but can be used to refer to the cctor context anywhere we use `ISymbolNode`. Similar simplification is now possible around fat function pointers. [tfs-changeset: 1655840]
Merge changes from TFS
Merge nmirror to master
With my recent change to unify delegate marshalling infrastructure between ProjectN and CoreRT, I have made GetPInvokeDelegateForStub in CoreCLR to be a nop. Tijoy pointed out that the part that doesn't need thunk support should work in CoreCLR as it used to be. This trivial change just brought that part for CoreCLR. [tfs-changeset: 1655953]
Merge changes from TFS
The ANSI helper methods are moved from McgMarshal in S.P.Interop to PInvokeMarshal in S.P.CoreLib so that they can be reused from CoreRT. I have also moved MarshalDirectiveException to CoreRT. [tfs-changeset: 1655965]
Merge changes from TFS
Merge nmirror to master
Now that we have `ISymbolDefinitionNode` in addition to `ISymbolNode`, we don't need to special case anymore.
It does the following: * Enable support for correct ANSI marshalling semantics (#2476) by calling into PInvokeMarshal ANSI string marshalling helpers. * Split Alloc and Transform for StringBuilder marshalling * Added test case for [Out] StringBuilder marshalling * Added null check in array marshaller.
Picks up dotnet/coreclr#10215.
Implement Unicode and Ansi StringBuilder Marshalling
* Emit IMAGE_REL_BASED_RELPTR32 reloc in interface dispatch cells We have means how to emit the reloc in the object writer now. Also, fix a bug where `CompilationGroup.ContainsType` was used instead of `ISymbolNode.RepresentsIndirectionCell` to determine if an indirection is needed. The distinction doesn't matter for the UTC-based compiler, but it does in the CoreRT compiler. Fixes #2542.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.