Skip to content

Marge from dotnet/corert master#1

Merged
gregkalapos merged 297 commits intogregkalapos:masterfrom
dotnet:master
May 25, 2017
Merged

Marge from dotnet/corert master#1
gregkalapos merged 297 commits intogregkalapos:masterfrom
dotnet:master

Conversation

@gregkalapos
Copy link
Owner

No description provided.

mmayr-at and others added 30 commits May 2, 2017 15:59
* Added command line options to specify include/exclude patterns for methods, types, namespaces, ...
* Added/Improved help text for new command line options
This api was just approved.

https://github.com/dotnet/corefx/issues/17345

This was also a good opportunity to get all our
non-constructed RuntimeType classes under one
umbrella base class and reorganize our type dissector
apis so they're more auditable.
[tfs-changeset: 1656958]
…3465)

Removes a bit of boilerplate. This is an API @davidwrighton suggested
some time ago. This was blocked until #3423 got implemented.
This change contains the following bug fixes:
* Call GC.KeepAlive for delegate marshalling. Sergiy encountered a
scenario where the delegate got collected when we tried to do a reverse
P/Invoke. This change adds a GC.KeepAlive at the end of the marshalling
stub to ensure the delegate is not collected during the duration of the
call.
* For ForwardDelegateCreation Stub set the correct calling convention.
Also set the IsPInvoke property of the ForwardDelegateCreation stub to
be true so that the JIT flag CORJIT_FLAG_IL_STUB is set which is
necessary for RyuJit to inline the call.
* Handle the scenarios when MarshalAs can be null.
Some of these type forwarders are still needed apparently

[tfs-changeset: 1656974]
… rights for Mutex, Semaphore, and EventWaitHandle in order to allow {Get|Set}AccessControl extension methods from System.Threading.AccessControl CoreFX library to read and modify security settings of those synchronization objects.

Also remove useless comments.

[tfs-changeset: 1656979]
…11234)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
… of RhZeroMemory to match what is in CoreCLR
…there is no BSTR implementation yet, they throw PlatformNotSupportedException.
…ions (#3474)

* Implemented verification for binary comparison and branching instructions
…blematic line commented out).

CR: KouVel

Take the Overlapped and PinnableBufferCache classes from CoreCLR and make required changes.
For now implement ThreadPool.UnsafeQueueNativeOverlapped via ThreadPool.UnsafeQueueUserWorkItem.

[tfs-changeset: 1657023]
Three Interop bug fixes
The coreclr S.P.CoreLIB do not have this
check and return -2.3561... for
this call like Math.Atan2(double.NegativeInfinity, double.NegativeInfinity)
but on CoreRT / N this return NaN because of this check.
This check has been there for ever , for reasons that
i don't know of.
Other changes in #10295 are not applicable to
corert since it's either test or math.cpp changes.
 Also make a CtlTokenIsInst for IsInst so that its generic lookup is handled separately from CastClass.

[tfs-changeset: 1657093]
Removing the special handling for atan2(±∞, ±∞) and pow(-1.0, ±∞)
JeremyKuhne and others added 29 commits May 22, 2017 14:07
)

* Update Unix SafeHandle to throw NotFound correctly

Need to match Windows semantics for missing files. This means throwing
FileNotFound only if the last segment of the path can't be found.

* Dispose handle and trim ending separator properly

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Make metadata generation dependency driven
…tionaries.

     The naming and exporting of method generic dictionaries are differnt from method entries. They have their own oridinals in the TOC files. Actually, method that has generic dictionaries are implemented by shared code, so its entry should not be in the TOC files. This change seperates the handling of method generic dictionaries from method entries and ensure they get a unique and consistent name between the compilation of shared library and an app.

     This change also moves the UTC symbol attribute abstraction (such as isInModule, isDirectReference, isExport ...) upwards to the JIT interface so that we no longer use a method handle for every method-related query or type handle for every type-related query. Also, in this way UTC does not need to know how to handle differnt types of symbols specifically. It will generally call SetPNSymbolAttributes with type system returned attributes on almost all symbols

[tfs-changeset: 1659289]
* Add PreInitData test and simple plumbing for ilproj
* make preinitdata.sh executable
* Add license header
Building against the lightweight version of S.P.CoreLib has bitrotted
over the past year. The classlib is handy for codegen and architecture
bringups and we might want to use it when getting rid of ready to run
helpers.
The prior commit added some runtime assertions for
conditions that we were taking new dependencies on.

This commits replaces those assertions with more
specific type declarations so all this can be enforced
at compile-time.
Make Marshal.PtrToStringAnsi() and StringToCoTaskMemAnsi()
and StringToHGlobalAnsi() work the same way CoreCLR/Desktop
does.
* Optimize ObjectWriter to emit series of bytes

Writing each byte of an `ObjectNode` out to the object file one by one
is inefficient. We also cannot emit all the bytes of an `ObjectNode` at
once because of the streaming nature of the LLVM API. Relocs, CFI info,
and symbol definitions are all interruptions emitted at specific points
in the stream. Optimize the current implementation by calculating the
longest run of bytes between each required interruption.

Testing on a large app, ASP.NET Core, this yields a 4% reduction in
total compilation time. The total time to compile (collected in Release
mode averaged over 5 runs) decreased from 31611ms to 30345ms. A further
gain may be possible when we get a high performance implementation of
Span<T>, able to efficiently pin the byte arrays we pass to native.
CR: SergeyK

Use normal (non-thread pool) threads to execute long-running tasks — as we do in CoreCLR.  Using thread pool threads caused starvation if other thread pool threads were busy working.  For instance, the
     ItemThreadSafetyTests.TestGetItemThreadSafety test in QA\ToF\tests\FX\Conformance\System.Collections.NonGeneric\4.0.0.0\Hashtable\HashtableTests.csproj creates 7 long-running tasks and would hang on a computer with only 4 logical cores.

[tfs-changeset: 1659419]
Removes SerializableAttribute from CoreCLR types not intended to be serializable as well as adding special handling to MulticastDelegate to prevent serializing delegates (which can't be correctly serialized cross platform/runtime).

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Case insensitive get operation throw
KeyNotFoundException since the underlying
implemention use Dictonery instead of
HashTable.
var set = GetSet(StaticResources.WithData);
// this succeed
set.GetString("String"));
// this is supposed to work,but throws
// KeyNotFound
set.GetString("string", true));
Sets things up for System.Runtime.Extensions.Tests bringup
on ILC.

Creates platform-specific EnvironmentAugments files.

Move GetEnvironmentVariable() over to EnvironmentAugments
(not used within CoreLib.)

Get of rid of emasculated UWP version and make it
use regular Windows version.
add S_UDT symbols to the object file.
It fixes #3538
This is to support NetStandard APIs that are useful for CoreFX test bringup and general compat.

[tfs-changeset: 1659572]
Make Module.Name work off metadata.
Reflection blocking is a size on disk optimization that prevents
generating native metadata for things that are considered
private implementation details of the runtime.

Since CoreRT is compiled ahead of time, a lot of things that
would be needed by a full VM (method names, custom attributes, etc.)
are no longer necessary at runtime. Metadata is strictly only necessary
to support reflection at runtime.

The policy I'm implementing is to consider everything private in our
implementation assemblies to be reflection blocked.

What this entails:

* Adding support for computing reflection blocked state in the compiler
* Tweak to blocking policy to allow us to express blocking state of MethodImpls
* Uncomment blocking table mapping table scanning (this broke the PInvoke test for CppCodegen and we needed a workaround)
* Opt in private assemblies to reflection blocking
Fix CleanupStub for Struct Marshalling with static fields
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
@gregkalapos gregkalapos merged commit c6ed261 into gregkalapos:master May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.