platform/upstream/coreclr.git
7 years ago[Unix] runtest.sh crossgen should exit on failure (#9907)
Steve MacLean [Thu, 23 Mar 2017 17:38:50 +0000 (13:38 -0400)]
[Unix] runtest.sh crossgen should exit on failure (#9907)

* Fix crossgen segfault

* Check crossgen in runtests.sh

* Do not use test -v

CI showed bash 4.2 feature test -v is not present on
OSX CI systems.  Fall back to more standard bash test

7 years agoMove IReflect.cs to shared partition. (#10415)
Atsushi Kanamori [Thu, 23 Mar 2017 14:02:28 +0000 (07:02 -0700)]
Move IReflect.cs to shared partition. (#10415)

7 years agoI used PVS-Studio static analyzer to check this project. I would like to suggest...
Ilya [Thu, 23 Mar 2017 13:58:18 +0000 (16:58 +0300)]
I used PVS-Studio static analyzer to check this project. I would like to suggest a variant of the way to fix the error, detected with the help of V534 diagnostic. Description of the diagnostic: https://viva64.com/en/examples/v534/ (#10414)

Incorrect variable 'i' from the outer loop is used in condition of the inner loop.

7 years agoMerge pull request #10412 from dotnet-bot/master-UpdateDependencies
Stephen Toub [Thu, 23 Mar 2017 13:41:12 +0000 (09:41 -0400)]
Merge pull request #10412 from dotnet-bot/master-UpdateDependencies

Update CoreClr, CoreFx to beta-25123-03, beta-25122-02, respectively (master)

7 years ago[x86/Linux] fix broken stack in DelayLoad_Helper when converting to AT&T syntax assem...
ragmani [Thu, 23 Mar 2017 09:09:09 +0000 (18:09 +0900)]
[x86/Linux] fix broken stack in DelayLoad_Helper when converting to AT&T syntax assembly. (#10383)

* fix broken stack in DelayLoad_Helper when converting to AT&T syntax assembly.
"push \frameFlags" was changed to "pushw $0x0" by converting to AT&T syntax assembly.

Signed-off-by: ragmani <ragmani0216@gmail.com>
* [x86/Linux] modify pushing frameFlags stack from Intel syntax to AT&T syntax.

Signed-off-by: ragmani <ragmani0216@gmail.com>
7 years agoUpdate CoreClr, CoreFx to beta-25123-03, beta-25122-02, respectively
dotnet-bot [Thu, 23 Mar 2017 08:57:36 +0000 (08:57 +0000)]
Update CoreClr, CoreFx to beta-25123-03, beta-25122-02, respectively

7 years agoMerge pull request #10064 from rahku/cgroup
Rahul Kumar [Thu, 23 Mar 2017 08:13:54 +0000 (01:13 -0700)]
Merge pull request #10064 from rahku/cgroup

memory limit in containers on linux

7 years agomemory limit in containers on linux
rahul [Thu, 9 Mar 2017 02:55:24 +0000 (18:55 -0800)]
memory limit in containers on linux

7 years agoVarious fixes for generating portable RID packages (#10409)
Gaurav Khanna [Thu, 23 Mar 2017 06:25:57 +0000 (23:25 -0700)]
Various fixes for generating portable RID packages (#10409)

7 years agoAdd handling of multiple CMake installations in probe-win (#9980)
Luis G [Thu, 23 Mar 2017 05:51:45 +0000 (02:51 -0300)]
Add handling of multiple CMake installations in probe-win (#9980)

* Add handling of multiple CMake installations in probe-win
Check if multiple CMake versions are installed, and use by default the first path available

Fixes #8221

* Fix typo in value accessor

* Restore previous null check in probe_win

* Remove redundant assignment

7 years agoRemoving the special handling in classlibnative for atan2(±∞, ±∞) and pow(-1.0, ...
Tanner Gooding [Thu, 23 Mar 2017 05:44:40 +0000 (22:44 -0700)]
Removing the special handling in classlibnative for atan2(±∞, ±∞) and pow(-1.0, ±∞). (#10295)

* Removing the special handling in classlibnative for atan2(±∞, ±∞) and pow(-1.0, ±∞).

* Fixing up the logic for HAVE_COMPATIBLE_POW in the PAL layer.

7 years agoFix fallout from switching corelib to use resx (#10407)
Jan Kotas [Thu, 23 Mar 2017 05:43:36 +0000 (22:43 -0700)]
Fix fallout from switching corelib to use resx (#10407)

Fixes #https://github.com/dotnet/corefx/issues/17413

7 years agoUnify command line arg for portable RID build (#10408)
Gaurav Khanna [Thu, 23 Mar 2017 04:35:24 +0000 (21:35 -0700)]
Unify command line arg for portable RID build (#10408)

7 years agoNamed Multiply and Divide methods on TimeSpan (#10366)
Jon Hanna [Thu, 23 Mar 2017 04:25:58 +0000 (04:25 +0000)]
Named Multiply and Divide methods on TimeSpan (#10366)

dotnet/corefx#16476

7 years agoAdd reflect.xml for a abstract* tests
Swaroop Sridhar [Wed, 22 Mar 2017 22:22:46 +0000 (15:22 -0700)]
Add reflect.xml for a abstract* tests

For the abstract* tests in question:
The tests check for TypeLoad exception from a derived class that doesn't implement an abstract method in base class.
However, the Linker removed the abstract method from base, so there is no exception.
Therefore, add reflect.xml to override the linker's behavior and enable testing for TypeLoadException.

7 years agoExclude some tests from Linker testing.
Swaroop Sridhar [Wed, 22 Mar 2017 22:22:04 +0000 (15:22 -0700)]
Exclude some tests from Linker testing.

Exclude some tests while testing via ILLINK.
The reasons are mentioned in issues.targets.

7 years agoLinker Testing: Use a central target for copying reflection roots.
Swaroop Sridhar [Mon, 20 Mar 2017 18:20:12 +0000 (11:20 -0700)]
Linker Testing: Use a central target for copying reflection roots.

Copy the test.refect.xml file (if one exists) as part of the
AfterBuild job -- so that individual tests need not identify
the CopyReflectionRoots explicitly as a default target.

7 years agoMerge pull request #9947 from DrewScoggins/xunitApi
Drew Scoggins [Thu, 23 Mar 2017 00:21:13 +0000 (17:21 -0700)]
Merge pull request #9947 from DrewScoggins/xunitApi

Update CoreCLR to use xunit perf api

7 years agoOpt-out of GC Stress for FEATURE_STANDALONE_GC (#10391)
Sean Gillespie [Wed, 22 Mar 2017 23:39:14 +0000 (16:39 -0700)]
Opt-out of GC Stress for FEATURE_STANDALONE_GC (#10391)

7 years agoJump stubs (#10398)
Bruce Forstall [Wed, 22 Mar 2017 23:36:53 +0000 (16:36 -0700)]
Jump stubs (#10398)

Add document on CLR Jump Stubs

7 years agoMove Type.IsSerializable and Type.DefaultBinder to shared file. (#10395)
Atsushi Kanamori [Wed, 22 Mar 2017 22:28:14 +0000 (15:28 -0700)]
Move Type.IsSerializable and Type.DefaultBinder to shared file. (#10395)

This will pave the way for the mirrorbot to fix
https://github.com/dotnet/corert/issues/3061.

7 years ago[x86/Linux] 16-byte aligned TheUMEntryPrestub (#10376)
Jonghyun Park [Wed, 22 Mar 2017 22:25:19 +0000 (07:25 +0900)]
[x86/Linux] 16-byte aligned TheUMEntryPrestub (#10376)

7 years agoSwitch tests to use OSX.10.12 RID (#10394)
Gaurav Khanna [Wed, 22 Mar 2017 20:54:41 +0000 (13:54 -0700)]
Switch tests to use OSX.10.12 RID (#10394)

7 years agoEnable Portable Windows RID (#10365)
Gaurav Khanna [Wed, 22 Mar 2017 20:30:49 +0000 (13:30 -0700)]
Enable Portable Windows RID (#10365)

* Enable Portable RID support for Windows and OSX.

7 years agoAdd updated timeout
Drew Scoggins [Tue, 21 Mar 2017 21:01:03 +0000 (14:01 -0700)]
Add updated timeout

7 years agoUpdate CoreCLR to use xunit perf api
Drew Scoggins [Fri, 3 Mar 2017 22:51:37 +0000 (14:51 -0800)]
Update CoreCLR to use xunit perf api

This updates the CoreCLR performance runs to use the new xunit
performance api.  This will unblock several people who were wanting to
move tests forward from netstandard1.4 which is were we have been locked
because of using the old desktop runner.

7 years agoReconcile the "easy" System\Reflection .cs files with their CoreRT versions. (#10387)
Atsushi Kanamori [Wed, 22 Mar 2017 17:51:46 +0000 (10:51 -0700)]
Reconcile the "easy" System\Reflection .cs files with their CoreRT versions. (#10387)

Files to be moved the shared partition (after CoreRT side is in)

AmbiguousMatchException.cs
AssemblyAttributes.cs
AssemblyContentType.cs
AssemblyNameFlags.cs
Binder.cs
BindingFlags.cs
CallingConventions.cs
CustomAttributeFormatException.cs
DefaultMemberAttribute.cs
EventAttributes.cs
ExceptionHandlingClauseOptions.cs
FieldAttributes.cs
GenericParameterAttributes.cs
ICustomAttributeProvider.cs
ImageFileMachine.cs
InterfaceMapping.cs
IntrospectionExtensions.cs
InvalidFilterCriteriaException.cs
IReflectableType.cs
ManifestResourceInfo.cs
MemberFilter.cs
MemberTypes.cs
MethodAttributes.cs
MethodImplAttributes.cs
Missing.cs
ModuleResolveEventHandler.cs
ParameterAttributes.cs
ParameterModifier.cs
PortableExecutableKinds.cs
ProcessorArchitecture.cs
PropertyAttributes.cs
ReflectionContext.cs
ReflectionTypeLoadException.cs
ResourceAttributes.cs
ResourceLocation.cs
StrongNameKeyPair.cs
TargetException.cs
TargetInvocationException.cs
TargetParameterCountException.cs
TypeAttributes.cs
TypeFilter.cs

7 years agoChange default CI job for ARM and clean-up (#10370)
Hyeongseok Oh [Wed, 22 Mar 2017 17:32:11 +0000 (02:32 +0900)]
Change default CI job for ARM and clean-up (#10370)

- Change ARM CI job triggered by PR: ubuntu16.04 debug, ubuntu release, tizen debug/release
- Clean-up: remove emulator build/test
- Change ubuntu16.04 x64 default job name and trigger phrase: conflict triggerring with arm

7 years agoFix an issue where GCStress allocated objects using the Gen 0 alloc context (#10322)
Sean Gillespie [Wed, 22 Mar 2017 17:25:08 +0000 (10:25 -0700)]
Fix an issue where GCStress allocated objects using the Gen 0 alloc context (#10322)

* Fix an issue where GCStress allocated objects using the Gen 0 alloc context

* Remove a GCStress MaybeTrigger on LOH allocations that attempted to use the gen 0 alloc context

7 years agoMerge pull request #10371 from AndyAyersMS/FixDevirt
Andy Ayers [Wed, 22 Mar 2017 17:23:56 +0000 (10:23 -0700)]
Merge pull request #10371 from AndyAyersMS/FixDevirt

Fix several devirtualization issues

7 years agoMove OSX packages to use 10.12 as the RID (#10354)
Gaurav Khanna [Wed, 22 Mar 2017 15:55:53 +0000 (08:55 -0700)]
Move OSX packages to use 10.12 as the RID (#10354)

7 years agoMerge pull request #10374 from dotnet/mirror-merge-9057970
Jan Kotas [Wed, 22 Mar 2017 15:03:09 +0000 (08:03 -0700)]
Merge pull request #10374 from dotnet/mirror-merge-9057970

Mirror changes from dotnet/corert

7 years agoMove DefaultBinder.cs to the shared partition. (#10355)
Atsushi Kanamori [Wed, 22 Mar 2017 11:37:12 +0000 (04:37 -0700)]
Move DefaultBinder.cs to the shared partition. (#10355)

7 years agoFileStream redirection got changed. Add ThreadPoolBoundHandle redirect.
Jeremy Kuhne [Tue, 21 Mar 2017 23:07:53 +0000 (16:07 -0700)]
FileStream redirection got changed. Add ThreadPoolBoundHandle redirect.

https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems?id=398142&_a=edit

[tfs-changeset: 1651640]

7 years agoFix leak in Task.WaitAny(..., int) (#10331)
Stephen Toub [Wed, 22 Mar 2017 06:09:22 +0000 (02:09 -0400)]
Fix leak in Task.WaitAny(..., int) (#10331)

WaitAny is effectively built on top of WhenAny, creating a continuation from the supplied tasks and then blocking on that continuation.  When a timeout is provided, it blocks with that timeout.  But if it doesn't complete within the timeout, it ends up leaking the continuations it created into the constituent tasks.  The fix is simply to force the returned continuation to complete, such that its continuation logic does all of the appropriate cleanup.

7 years agoUpdate CoreClr, CoreFx to beta-25121-02, beta-25122-01, respectively (#10310)
dotnet bot [Wed, 22 Mar 2017 05:04:42 +0000 (22:04 -0700)]
Update CoreClr, CoreFx to beta-25121-02, beta-25122-01, respectively (#10310)

7 years agoSwitch coreclr corelib to use resx (#10372)
Alex Perovich [Wed, 22 Mar 2017 05:02:47 +0000 (00:02 -0500)]
Switch coreclr corelib to use resx (#10372)

* Revert "Revert "Switch coreclr corelib to use resx (#10268)""

* Add resources.target override

This fixes the GenerateResource task running on the arm emulator runs.

* Fix run.sh to have a working Tools-Override

7 years ago[Local GC] Forbid inclusion of gcscan.h from VM and DAC directories (#10332)
Sean Gillespie [Wed, 22 Mar 2017 05:00:12 +0000 (22:00 -0700)]
[Local GC] Forbid inclusion of gcscan.h from VM and DAC directories (#10332)

* Forbid inclusion of gcscan.h from VM and DAC directories

* Address code review feedback - hoist IsGCHeapInitialized check to an assert, since the heap should definitely be initialized if we are validating objects that ostensibly came from it

7 years agoFix several devirtualization issues
Andy Ayers [Tue, 21 Mar 2017 20:17:28 +0000 (13:17 -0700)]
Fix several devirtualization issues

When doing interface devirtualization, if the object type is canonical,
ensure that the owner type is too. The jit may present a mixed set
when inlining a shared method into a non-shared method. Ideally the
jit would also be able to present exact object types in such cases but
currently it cannot guarantee this. Closes #10311.

Adjust contracts to address some contract violations seen in desktop
testing. Make the helper non-static and fold in some of the info that
was passed from the caller to bring the desktop and CoreCLR implementations
closer.

Disallow interface devirt if the method is final but the class is not
exact or final, since derived classes can still override final methods
when implementing interfaces.

Don't try and devirtualize interface calls from com objects.

Add some related test cases.

7 years agoMerge pull request #10363 from jkotas/revert
Jan Kotas [Wed, 22 Mar 2017 00:45:57 +0000 (17:45 -0700)]
Merge pull request #10363 from jkotas/revert

Revert "Switch coreclr corelib to use resx (#10268)"

7 years agoRevert "Switch coreclr corelib to use resx (#10268)"
Jan Kotas [Tue, 21 Mar 2017 23:24:52 +0000 (16:24 -0700)]
Revert "Switch coreclr corelib to use resx (#10268)"

This reverts commit 12ef04c22b07f1e4ec5a63009298e4537a2c8e1a.

7 years agoFix Linux/x86 call alignment calculation and insertion (#10266)
Bruce Forstall [Tue, 21 Mar 2017 22:27:07 +0000 (15:27 -0700)]
Fix Linux/x86 call alignment calculation and insertion (#10266)

* Fix Linux/x86 call alignment calculation and insertion

The existing system of calculating per-call alignment adjustments
did not consider the possibility of nested calls. On x86, some
arguments for a call might be pushed on the stack before a
nested call's arguments start being pushed. Thus, a call can't
consider only its own arguments when determining the stack level.

Instead, use the existing genStackLevel variable, updated
dynamically during code generation, to determine the baseline
stack alignment when a call first needs to push something on
the stack, or if it has no stack arguments, whether it needs to
align the stack before a call.

One wrinkle here is that the fgAddCodeRef() function for adding
throw blocks for array bounds checks, and other similar helpers,
need to know the stack level on entry, and this stack level is
computed during argument morphing. There is a tough phase ordering
problem here. So, we bail out and force an EBP frame if there are
any such throw helpers in the function. When using an EBP frame,
the helper block doesn't need to know the stack level -- it is
only needed for ESP frames, needed for unwinding. Note that this
bail out already existed if the same helper needed multiple different
stack levels on entry. We could do slightly better without too much
work by not bailing out for top-level calls with no stack arguments.

* Track max alignment added for nested calls during codegen

This information is needed by Linux/x86 for an assert about
maximum emitter stack depth.

* Make max stack align tracking available in release as well

The assert these are used in is a noway_assert.

* Formatting

7 years ago[x86/Linux] Invoke gcResetForBB() in genFuncletProlog (#10186)
Hanjoung Lee [Tue, 21 Mar 2017 22:00:56 +0000 (07:00 +0900)]
[x86/Linux] Invoke gcResetForBB() in genFuncletProlog (#10186)

7 years agoMerge pull request #10343 from parjong/fix/self_override
Andy Ayers [Tue, 21 Mar 2017 20:08:01 +0000 (13:08 -0700)]
Merge pull request #10343 from parjong/fix/self_override

Fix bogus assert in resolveVirtualMethodHelper and update related ilproj

7 years agoAdd /silent option to crossgen (#10350)
Bruce Forstall [Tue, 21 Mar 2017 20:01:52 +0000 (13:01 -0700)]
Add /silent option to crossgen (#10350)

This sets the NGenOptions.fSilent flag, which prevents displaying
the final output message.

This is useful for JIT asm diff generation.

7 years agoSwitch coreclr corelib to use resx (#10268)
Alex Perovich [Tue, 21 Mar 2017 19:55:39 +0000 (14:55 -0500)]
Switch coreclr corelib to use resx (#10268)

* Switch to resx

* Use roslyn rewriter to switch from GetResourceString to SR

* More GetResourceString changes

* Add missing resource

* Remove Environment.GetResourceString and replace final usages with SR

* Remove comment

* Fix spacing

* Replace final instances of Environment.GetResourceString

* Add another missing resource

* Add back Environment.GetResourceStringLocal because the runtime needs it

7 years agoSystem.IO.Path.IsPathRooted does not check if valid drive letter on Windows (#10323)
Viktor Hofer [Tue, 21 Mar 2017 19:36:25 +0000 (20:36 +0100)]
System.IO.Path.IsPathRooted does not check if valid drive letter on Windows (#10323)

7 years agoMerge pull request #10254 from sdmaclea/PR-FIX-SCRIPT-ERROR
Aditya Mandaleeka [Tue, 21 Mar 2017 19:01:53 +0000 (12:01 -0700)]
Merge pull request #10254 from sdmaclea/PR-FIX-SCRIPT-ERROR

Fix script ERRORLEVEL typo

7 years agoTemporarily disable frequently failing Sleep PAL tests (#10313)
Koundinya Veluri [Tue, 21 Mar 2017 18:47:32 +0000 (11:47 -0700)]
Temporarily disable frequently failing Sleep PAL tests (#10313)

See #8321

7 years agoMerge pull request #10321 from WinCPP/issue-7060
Ian Hays [Tue, 21 Mar 2017 17:37:51 +0000 (10:37 -0700)]
Merge pull request #10321 from WinCPP/issue-7060

Issue #7060 - Make StreamReader.ReadBuffer non-virtual

7 years agoMerge pull request #10327 from mikedn/assertion-info
Joseph Tremoulet [Tue, 21 Mar 2017 15:06:24 +0000 (11:06 -0400)]
Merge pull request #10327 from mikedn/assertion-info

Refactor GenTree assertion information storage

7 years ago[x86/Linux] Log UpdateRegDisplay calls (#10335)
Jonghyun Park [Tue, 21 Mar 2017 09:31:04 +0000 (18:31 +0900)]
[x86/Linux] Log UpdateRegDisplay calls (#10335)

7 years agoFix bogus assert in resolveVirtualMethodHelper and update related ilproj
Jonghyun Park [Tue, 21 Mar 2017 06:10:30 +0000 (15:10 +0900)]
Fix bogus assert in resolveVirtualMethodHelper and update related ilproj

7 years ago[x86/Linux] Use 4-byte align for double in struct (#10340)
Jonghyun Park [Tue, 21 Mar 2017 04:36:27 +0000 (13:36 +0900)]
[x86/Linux] Use 4-byte align for double in struct (#10340)

7 years ago[x86/Linux] Correct update on ResumableFrame (#10339)
Jonghyun Park [Tue, 21 Mar 2017 04:26:19 +0000 (13:26 +0900)]
[x86/Linux] Correct update on ResumableFrame (#10339)

7 years agoMerge pull request #10341 from dotnet/mirror-merge-9056283
Jan Kotas [Tue, 21 Mar 2017 04:13:04 +0000 (21:13 -0700)]
Merge pull request #10341 from dotnet/mirror-merge-9056283

Mirror changes from dotnet/corert

7 years agoDelete moved file
Jan Kotas [Tue, 21 Mar 2017 02:30:56 +0000 (19:30 -0700)]
Delete moved file

7 years agoNS2.0 - Complete System.Security namespace.
Atsushi Kanamori [Mon, 20 Mar 2017 21:01:10 +0000 (14:01 -0700)]
NS2.0 - Complete System.Security namespace.

- Add GetObjectData() implementation to System.SecurityExcepton

- Clean up a bit and move to shared partition.

7 years ago'root' as a special case in UTIL_IsExecuteBitsSet (#10246)
Jonghyun Park [Tue, 21 Mar 2017 00:14:02 +0000 (09:14 +0900)]
'root' as a special case in UTIL_IsExecuteBitsSet (#10246)

7 years agoFix MAC build (#10328)
Tarek Mahmoud Sayed [Mon, 20 Mar 2017 23:19:48 +0000 (16:19 -0700)]
Fix MAC build (#10328)

This is temporary fix  to unblock the CI and coreclr building for MAC. this change should be reverted after having the proper fix for how we load ICU on MAC

7 years agoMerge pull request #10325 from dotnet/mirror-merge-9055987
Jan Kotas [Mon, 20 Mar 2017 23:17:55 +0000 (16:17 -0700)]
Merge pull request #10325 from dotnet/mirror-merge-9055987

Mirror changes from dotnet/corert

7 years agoMerge pull request #10330 from omajid/fix-markdown-atx-headers
Aditya Mandaleeka [Mon, 20 Mar 2017 23:01:13 +0000 (16:01 -0700)]
Merge pull request #10330 from omajid/fix-markdown-atx-headers

Fix markdown headings

7 years agoFix markdown headings
Omair Majid [Mon, 20 Mar 2017 22:12:33 +0000 (18:12 -0400)]
Fix markdown headings

GitHub recently changed how atx headings (beginning with `#`) are
rendered. A space is now required between `#` and the following text
for the heading to be recognized.

Update headings in the docs to match the expected format.

See https://github.github.com/gfm/#atx-headings

7 years agoDelete moved files
Jan Kotas [Mon, 20 Mar 2017 21:28:18 +0000 (14:28 -0700)]
Delete moved files

7 years agoRefactor GenTree assertion information storage
Mike Danes [Sat, 11 Mar 2017 09:04:04 +0000 (11:04 +0200)]
Refactor GenTree assertion information storage

Stealing a bit from gtAssertionNum is ugly  and error prone (e.g. bool HasAssertion() { return gtAssertionNum != 0; } is incorrect if the edge bit is set).

7 years agoFix another per code review
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Mon, 20 Mar 2017 21:13:33 +0000 (21:13 +0000)]
Fix another per code review

7 years agoMerge pull request #10319 from JosephTremoulet/NullField
Joseph Tremoulet [Mon, 20 Mar 2017 21:13:14 +0000 (17:13 -0400)]
Merge pull request #10319 from JosephTremoulet/NullField

Permit null object in `GenTreeUseEdgeIterator`

7 years agoMove Type.cs and Module.cs to Shared Partition.
Atsushi Kanamori [Mon, 20 Mar 2017 17:42:17 +0000 (10:42 -0700)]
Move Type.cs and Module.cs to Shared Partition.

Types.cs is split into the main file, Type.Helpers.cs and Type.Enum.cs.
All three will be shared.

- GenericTypeArguments - reconcile with CoreClr
  (the code is identical provided that the underlying
  Type provider implemented IsConstructedGenericType
  correctly. But we can't assume that for third party types.)

- IsInterface and IsSerializable has some CoreClr
  specific logic for RuntimeTypes - moving this out
  to the unshared space for now.

- IsContextFulImpl()/IsMarshalByRefImpl() - corrected
  implemention to match CoreClr.

- IsIntegerType - no CommonRuntimeTypes in CoreClr
  so going back to typeof() checks - the runtime implemented
  types override all this enum code anyway on both runtimes.

- GetRootElementType() - upgraded visibility to "internal"
  as a concession to CoreClr.

- CoreCLR's IsVisible has a fast path - we'll keep that.

- Moved IsRuntimeImplemented() out of Internal.Reflection.Core.NonPortable
  namespace so calls to it can be more easily shared.

- Module.MethodHandle was not implemented correctly for
  non-runtime modules (it's supposed to return default(ModuleHandle)).
  This makes it behave correctly and reconciles Module.cs
  with the CoreCLR version.

7 years agoMerge pull request #10317 from dotnet/mirror-merge-9055826
Jan Kotas [Mon, 20 Mar 2017 21:03:14 +0000 (14:03 -0700)]
Merge pull request #10317 from dotnet/mirror-merge-9055826

Mirror changes from dotnet/corert

7 years agoIssue #7060 - Make StreamReader.ReadBuffer non-virtual
WinCPP [Mon, 20 Mar 2017 19:58:55 +0000 (01:28 +0530)]
Issue #7060 - Make StreamReader.ReadBuffer non-virtual

7 years agoPermit null object in `GenTreeUseEdgeIterator`
Joseph Tremoulet [Mon, 20 Mar 2017 19:39:46 +0000 (15:39 -0400)]
Permit null object in `GenTreeUseEdgeIterator`

We use `GT_FIELD` for static field loads, which have no instance pointer.
Update the iterator constructor to recognize this as a valid state rather
than fail an assertion.

7 years agoMerge pull request #10315 from dotnet-bot/from-tfs
Bruce Forstall [Mon, 20 Mar 2017 19:09:36 +0000 (12:09 -0700)]
Merge pull request #10315 from dotnet-bot/from-tfs

Merge changes from TFS

7 years agoFix FileStream for ProjectN
Jan Kotas [Sun, 19 Mar 2017 02:41:39 +0000 (19:41 -0700)]
Fix FileStream for ProjectN

[tfs-changeset: 1651325]

7 years agoRemove message about falling to default for MethodContext::repGetEEInfo()
Bruce Forstall [Mon, 20 Mar 2017 18:45:47 +0000 (11:45 -0700)]
Remove message about falling to default for MethodContext::repGetEEInfo()

[tfs-changeset: 1651465]

7 years agoMerge pull request #10301 from dotnet-bot/from-tfs
Brian Sullivan [Mon, 20 Mar 2017 17:34:10 +0000 (10:34 -0700)]
Merge pull request #10301 from dotnet-bot/from-tfs

Merge changes from TFS

7 years agoInitial document on AssemblyLoadContext Design (#10271)
Gaurav Khanna [Mon, 20 Mar 2017 17:32:34 +0000 (10:32 -0700)]
Initial document on AssemblyLoadContext Design (#10271)

* Initial document on AssemblyLoadContext Design

7 years agoMerge pull request #10262 from briansull/refactor2
Brian Sullivan [Mon, 20 Mar 2017 17:24:17 +0000 (10:24 -0700)]
Merge pull request #10262 from briansull/refactor2

Updates for the handling of Profile data in the JIT

7 years agoMake GetModuleHandle() sharable. (#10309)
Atsushi Kanamori [Mon, 20 Mar 2017 17:03:26 +0000 (10:03 -0700)]
Make GetModuleHandle() sharable. (#10309)

7 years agoMerge pull request #9445 from hqueue/arm/ci
Gaurav Khanna [Mon, 20 Mar 2017 15:55:56 +0000 (08:55 -0700)]
Merge pull request #9445 from hqueue/arm/ci

[ARM/CI] ARM CI script for arm and armel

7 years agoReconciles Type.cs with CoreRT version for move to shared partition. (#10306)
Atsushi Kanamori [Mon, 20 Mar 2017 15:18:45 +0000 (08:18 -0700)]
Reconciles Type.cs with CoreRT version for move to shared partition. (#10306)

* Clone files and add resource strings.

* Subset each partial class.

* String=>string and Environment.GetResourceString => SR.cs

Doing this upfront with reduce the upcoming diffs - hopefully.

* Add IsRuntimeImplemented() emulator.

* One method was put in the wrong file. Correcting.

* Converted Type.Enum.cs to CoreRT style member by member.

* Converted Type.Helpers.cs to CoreRT style member by member.

* Internalize __Filter.cs into Type.Helpers.cs

* Pretransform to reduce diffs.

Removed contracts and comments,
"abstract public" -> "public abstract"

* Converted Type.cs to CoreRT style member by member.

* Eh.. rather not share IsInterface and IsSerializable than have that #if CORECLR.

* Transplant the CoreRt files (now just a reordering.)

7 years ago[Arm64/Unix] Set PROCFS_* available in tryrun (#10255)
Steve MacLean [Mon, 20 Mar 2017 15:17:05 +0000 (11:17 -0400)]
[Arm64/Unix] Set PROCFS_* available in tryrun (#10255)

7 years agoDesktop side of the change to remove COR_JIT_EE_VERSION
Bruce Forstall [Mon, 20 Mar 2017 02:46:08 +0000 (19:46 -0700)]
Desktop side of the change to remove COR_JIT_EE_VERSION

1. Bring over the JIT-EE interface file changes,
2. Stop building ctpjit.dll, and delete its build rules,
3. Stop building skipjit.dll.

[tfs-changeset: 1651372]

7 years agoInvariant globalization (#10264)
Tarek Mahmoud Sayed [Sun, 19 Mar 2017 23:19:56 +0000 (16:19 -0700)]
Invariant globalization (#10264)

* Invariant Globalization Work

* Convert the testing Exceptions to asserts

* Remove un-needed comment

* Fix typos

* Fix unrelated typo

* Address the PR feedback

* More feedback addressing

* More feedback addressing

* Fix Linux break

* More feedback addressing

* cleanup

7 years agoMerge pull request #10291 from dotnet-bot/master-UpdateDependencies
Stephen Toub [Sun, 19 Mar 2017 12:06:20 +0000 (08:06 -0400)]
Merge pull request #10291 from dotnet-bot/master-UpdateDependencies

Update CoreClr to beta-25119-02 (master)

7 years agoUpdate CoreClr to beta-25119-02
dotnet-bot [Sun, 19 Mar 2017 08:08:34 +0000 (08:08 +0000)]
Update CoreClr to beta-25119-02

7 years agoFix code to build with older VC++ compiler (#10281)
Bruce Forstall [Sun, 19 Mar 2017 06:35:05 +0000 (23:35 -0700)]
Fix code to build with older VC++ compiler (#10281)

7 years agoRemove potential overflow in SafeBSTRHandle (#10182)
John Bottenberg [Sun, 19 Mar 2017 04:33:58 +0000 (21:33 -0700)]
Remove potential overflow in SafeBSTRHandle (#10182)

7 years agoFix a typo in exceptoinhandling.cpp (#10237)
Jonghyun Park [Sun, 19 Mar 2017 04:32:57 +0000 (13:32 +0900)]
Fix a typo in exceptoinhandling.cpp (#10237)

7 years agoI hoisted the accounting for LOH into allocate_large_objects to avoid missing countin...
Maoni Stephens [Sun, 19 Mar 2017 04:30:55 +0000 (21:30 -0700)]
I hoisted the accounting for LOH into allocate_large_objects to avoid missing counting in certain stages during bgc when we go through bgc_loh_alloc_clr instead of adjust_limit_clr (#10284)

7 years agoFix for Module.GetMethod(string) (#10283)
Atsushi Kanamori [Sat, 18 Mar 2017 22:15:43 +0000 (15:15 -0700)]
Fix for Module.GetMethod(string) (#10283)

7 years agoMerge pull request #10280 from dotnet-bot/master-UpdateDependencies
Stephen Toub [Sat, 18 Mar 2017 21:40:09 +0000 (17:40 -0400)]
Merge pull request #10280 from dotnet-bot/master-UpdateDependencies

Update CoreClr to beta-25118-03 (master)

7 years agoMerge pull request #10272 from dotnet/mirror-merge-9051754
Jan Kotas [Sat, 18 Mar 2017 20:57:24 +0000 (13:57 -0700)]
Merge pull request #10272 from dotnet/mirror-merge-9051754

Mirror changes from dotnet/corert

7 years agoMerge pull request #10216 from JosephTremoulet/SpanBench
Joseph Tremoulet [Sat, 18 Mar 2017 18:06:54 +0000 (14:06 -0400)]
Merge pull request #10216 from JosephTremoulet/SpanBench

Update SpanBench test

7 years agoUpdate CoreClr to beta-25118-03
dotnet-bot [Sat, 18 Mar 2017 16:37:23 +0000 (16:37 +0000)]
Update CoreClr to beta-25118-03

7 years agoUpdate SpanBench test
Joseph Tremoulet [Thu, 16 Mar 2017 00:43:01 +0000 (20:43 -0400)]
Update SpanBench test

 - Re-enable the tests that were disabled in e859c309.
 - Re-work how tests are invoked from the command line to require less
   boilerplate
     - Now each test has a single [Benchmark] entrypoint
     - That entrypoint invokes its test's single inner-loop by wrapping it
       in a lambda that it passes to a new helper Invoke method (shared
       across all tests) which handles the xunit vs. command-line
       differences..
     - Main finds the entrypoints by using reflection to search for the
       [Benchmark] attributes, so the explicit list of stringified test
       names is no longer needed and the command line will run the same
       set of tests that xunit-perf does.
 - The new SpanAPI tests now get invoked when this tests is run from the
   command line as well.
 - Add [NoInlining] to the SpanAPI tests' kernels.
 - Add some heap writes and conditional writes to prevent deadcode
   optimization from eliminating tests' kernels (assuming we don't do
   interprocedural constant propagation or deadcode, or store sinking and
   final value calculation, or PRE...).
 - Split the Index SpanAPI tests into one version that uses a
   loop-invariant index and thus should get hoisted out of the loop, and
   another version that uses variant indices.

7 years agoMerge pull request #10054 from pgavlin/GenTreeUseEdgeIterator
Pat Gavlin [Sat, 18 Mar 2017 15:41:40 +0000 (08:41 -0700)]
Merge pull request #10054 from pgavlin/GenTreeUseEdgeIterator

Improve GenTreeUseEdgeIterator.

7 years agoDelete moved files
Jan Kotas [Sat, 18 Mar 2017 15:22:40 +0000 (08:22 -0700)]
Delete moved files

7 years agoRemove JIT-EE version ifdefs (#10273)
Bruce Forstall [Sat, 18 Mar 2017 15:12:52 +0000 (08:12 -0700)]
Remove JIT-EE version ifdefs (#10273)

* Remove COR_JIT_EE_VERSION define

Currently, we maintain two versions of the JIT-EE interface in the
source tree: the current version, and .NET 4.6 version. This is
managed by the `COR_JIT_EE_VERSION` define. Any new changes to the JIT-EE
interface must be put under `#if COR_JIT_EE_VERSION > 460`. As of now,
there are quite a few of these `#if` statements in the tree.

We started doing this so we could build and ship a CTP (Community
Technology Preview) version of the JIT from the current source tree that
runs against earlier versions of the runtime that are widely available
to customers, so those customers can try out the new JIT and give us
early feedback. This was done during the RyuJIT/x64 bring-up before
shipping .NET 4.6, to get as much feedback as possible before replacing
JIT64. After 4.6 shipped, we re-based the old version of the JIT-EE
interface to the 4.6 version, and started adding the above `#if`
conditions, with the thought that if we ever shipped another CTP, it
would be expected to run on top of 4.6. We have not shipped such a
thing, and we currently have no plans to build another CTP in the same
way we did before. (Early adopters can try out the "live" JIT in the
.NET Core open source project, although that JIT can't be used on the
desktop.)

So, to simplify the code, and reduce the cost of adding to or changing
the JIT-EE interface, we are removing the `COR_JIT_EE_VERSION` define.

7 years agoMerge pull request #10278 from dotnet-bot/master-UpdateDependencies
Stephen Toub [Sat, 18 Mar 2017 12:32:46 +0000 (08:32 -0400)]
Merge pull request #10278 from dotnet-bot/master-UpdateDependencies

Update CoreClr to beta-25118-02 (master)

7 years agoMove ParameterInfo.cs and Assembly.cs to shared partition. (#10270)
Atsushi Kanamori [Sat, 18 Mar 2017 11:37:06 +0000 (04:37 -0700)]
Move ParameterInfo.cs and Assembly.cs to shared partition. (#10270)

* Clone the files.

* Split the members between shared and nonshared files.

* Replaced ParameterInfo with CoreRt text member by member.

* Replaced Module.cs with CoreRt text member by member.

* Remove dead filter code.

* Replaced Assembly.cs with CoreRt text member by member.

* Transplanted CoreRt files.

This is a reordering without any other changes.
Verified by sorting the old and new files and
diffing.

* Migrated ParameterInfo.cs and Assembly.cs to shared directory.

Leaving Module.cs in place for now as one line is going to
have to change over in CoreRt land.

 ModuleHandle ModuleHandle => new ModuleHandle(this);

* Cleanup.

* Move the final internal methods to RuntimeParameterInfo.