Skip to content

Commit cc99fab

Browse files
authored
Merge pull request dotnet#23819 from safern/merge-master-nullable
Merge master into nullable feature
2 parents 56f0755 + a6f3bed commit cc99fab

File tree

169 files changed

+4435
-1856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+4435
-1856
lines changed

BuildToolsVersion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.0-preview4-03828-01
1+
3.0.0-preview4-03906-01

Documentation/Profiling/davbr-blog-archive/Creating an IL-rewriting profiler.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ Keep in mind there are many ways to do this. I'll outline one of the more straig
1919

2020
- In your **ICorProfilerCallback2::ModuleLoadFinished** callback, you call **ICorProfilerInfo2::GetModuleMetadata** to get a pointer to a metadata interface on that module.
2121
- QI for the metadata interface you want. Search MSDN for "IMetaDataImport", and grope through the table of contents to find topics on the metadata interfaces.
22-
- Once you're in metadata-land, you have access to all the types in the module, including their fields and function prototypes. You may need to parse metadata signatures and [this signature parser](samples/sigparser.cpp) may be of use to you.
22+
- Once you're in metadata-land, you have access to all the types in the module, including their fields and function prototypes. You may need to parse metadata signatures and [this signature parser](samples/sigparse.cpp) may be of use to you.
2323
- In your **ICorProfilerCallback2::JITCompilationStarted** callback, you may use **ICorProfilerInfo2::GetILFunctionBody** to inspect the original IL, and **ICorProfilerInfo2::GetILFunctionBodyAllocator** and then **ICorProfilerInfo2::SetILFunctionBody** to replace that IL with your own.
2424

2525
**Q: What about NGEN?**
2626

27-
If you want to rewrite IL of NGENd modules, well, it's kind of too late because the original IL has already been compiled into native code. However, you do have some options. If your profiler sets the **COR\_PRF\_USE\_PROFILE\_IMAGES** monitor event flag, that will force the "NGEN /Profile" version of the modules to load if they're available. (I've already blogged a little about "NGEN /Profile", including how to generate those modules, [here](enter-leave-tailcall-hooks-part-1-basics.md).) So, at run-time, one of two things will happen for any given module.
27+
If you want to rewrite IL of NGENd modules, well, it's kind of too late because the original IL has already been compiled into native code. However, you do have some options. If your profiler sets the **COR\_PRF\_USE\_PROFILE\_IMAGES** monitor event flag, that will force the "NGEN /Profile" version of the modules to load if they're available. (I've already blogged a little about "NGEN /Profile", including how to generate those modules, [here](ELT Hooks - The Basics.md).) So, at run-time, one of two things will happen for any given module.
2828

2929
1) If you set **COR\_PRF\_USE\_PROFILE\_IMAGES** and the NGEN /Profile version is available, it will load. You will then have the opportunity to respond to the **JITCachedFunctionSearchStarted** callback. When a function from an NGEN /Profile module is about to be executed for the first time, your profiler receives the **JITCachedFunctionSearchStarted** callback. You may then set the \*pbUseCachedFunction [out] parameter to FALSE, and that will force the CLR to JIT the function instead of using the version that was already compiled into the NGEN /Profile module. Then, when the CLR goes to JIT the function, your profiler receives the **JITCompilationStarted** callback and can perform IL rewriting just as it does above for functions that exist in non-NGENd mdoules. What's nice about this approach is that, if you only need to instrument a few functions here and there, it can be faster not to have to JIT everything, just so you get the **JITCompilationStarted** callback for the few functions you're interested in. This approach can therefore improve startup performance of the application while it's being profiled. The disadvantage, though, is that your profiler must ensure the NGEN /Profile versions of all the modules get generated beforehand and get installed onto the user's machine. Depending on your scenarios and customers, this may be too cumbersome to ensure.
3030

Documentation/design-docs/default-interface-methods.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ The algorithm is amended as follows:
4141
* If the interface method itself is not abstract, add it to the list.
4242
* Apply all MethodImpls specified in the list of interfaces implicitly implemented by the runtime class of the instance through which the interface method is invoked and add the methods to the list.
4343
* Go over the owning types of each of the candidate methods in the list. If the owning type is less concrete than some other type in the list (there is another method in the list whose owning type requires the less concrete type), remove it from the list.
44-
* If there's more than one method in the list, throw NotSupportedException
45-
* If there's exactly one method in the list call that method
44+
* If there's more than one method in the list, throw AmbiguousImplementationException
45+
* If there's exactly one method in the list and the method is not abstract, call that method
46+
* If there's exactly one method in the list but the method is abstract, throw `EntryPointNotFoundException`.
4647
* If there's no method in the list and the interface is variant, repeat the above algorithm, looking for a variant match. Return the first variant match provided by a most specific interface.
4748

4849
**Section** "III.2.1 constrained. prefix" the paragraph starting with "This last case can only occur when method was defined on `System.Object`, `System.ValueType`, or `System.Enum`" is extended to also cover default interface method implementation. In the case the interface method implementation is provided by an interface, the implicit boxing becomes _observable_ to the program.
4950

50-
**Section** "III.4.2 callvirt" is extended to allow throwing `AmbiguousImplementationException` if the implementation of the interface method resolves at runtime to more than one default interface method.
51+
**Section** "III.4.2 callvirt" is extended to allow throwing `AmbiguousImplementationException` if the implementation of the interface method resolves at runtime to more than one default interface method. It's also extended to specify throwing `EntryPointNotFoundException` if the default interface implementation is abstract.
5152

52-
**Section** "III.4.18 ldvirtftn" is extended to allow throwing `AmbiguousImplementationException` if the implementation of the interface method resolves at runtime to more than one default interface method.
53+
**Section** "III.4.18 ldvirtftn" is extended to allow throwing `AmbiguousImplementationException` if the implementation of the interface method resolves at runtime to more than one default interface method. It's also extended to specify throwing `EntryPointNotFoundException` if the default interface implementation is abstract.

ILAsmVersion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.0-preview4-27603-71
1+
3.0.0-preview5-27607-72

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ resources:
1818
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.6-WithNode-f4d3fe3-20181220200247
1919

2020
- container: musl_arm64_build_image
21-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine10fcdcf-20190208200917
21+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-406629a-20190403203438
2222

2323
- container: centos7_x64_build_image
2424
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-d485f41-20173404063424

build-test.sh

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,75 @@ generate_layout()
160160
echo "Resolve runtime dependences via $nextCommand"
161161
eval $nextCommand
162162
fi
163+
164+
# Precompile framework assemblies with crossgen if required
165+
if [ $__DoCrossgen -ne 0 ]; then
166+
precompile_coreroot_fx
167+
fi
168+
}
169+
170+
precompile_coreroot_fx()
171+
{
172+
echo "${__MsgPrefix}Running crossgen on framework assemblies in CORE_ROOT: '${CORE_ROOT}'"
173+
174+
# Read the exclusion file for this platform
175+
skipCrossGenFiles=($(read_array "$(dirname "$0")/tests/skipCrossGenFiles.${__BuildArch}.txt"))
176+
177+
local overlayDir=$CORE_ROOT
178+
179+
filesToPrecompile=$(find -L $overlayDir -iname \*.dll -not -iname \*.ni.dll -not -iname \*-ms-win-\* -type f )
180+
for fileToPrecompile in ${filesToPrecompile}
181+
do
182+
local filename=${fileToPrecompile}
183+
if is_skip_crossgen_test "$(basename $filename)"; then
184+
continue
185+
fi
186+
echo Precompiling $filename
187+
$overlayDir/crossgen /Platform_Assemblies_Paths $overlayDir $filename 1> $filename.stdout 2>$filename.stderr
188+
local exitCode=$?
189+
if [[ $exitCode != 0 ]]; then
190+
if grep -q -e '0x80131018' $filename.stderr; then
191+
printf "\n\t$filename is not a managed assembly.\n\n"
192+
else
193+
echo Unable to precompile $filename.
194+
cat $filename.stdout
195+
cat $filename.stderr
196+
exit $exitCode
197+
fi
198+
else
199+
rm $filename.{stdout,stderr}
200+
fi
201+
done
202+
}
203+
204+
declare -a skipCrossGenFiles
205+
206+
function is_skip_crossgen_test {
207+
for skip in "${skipCrossGenFiles[@]}"; do
208+
if [ "$1" == "$skip" ]; then
209+
return 0
210+
fi
211+
done
212+
return 1
213+
}
214+
215+
# Get an array of items by reading the specified file line by line.
216+
function read_array {
217+
local theArray=()
218+
219+
if [ ! -f "$1" ]; then
220+
return
221+
fi
222+
223+
# bash in Mac OS X doesn't support 'readarray', so using alternate way instead.
224+
# readarray -t theArray < "$1"
225+
# Any line that starts with '#' is ignored.
226+
while IFS='' read -r line || [ -n "$line" ]; do
227+
if [[ $line != "#"* ]]; then
228+
theArray[${#theArray[@]}]=$line
229+
fi
230+
done < "$1"
231+
echo ${theArray[@]}
163232
}
164233

165234
generate_testhost()
@@ -499,6 +568,7 @@ usage()
499568
echo "generatelayoutonly - only pull down dependencies and build coreroot"
500569
echo "generatetesthostonly - only pull down dependencies and build coreroot and the CoreFX testhost"
501570
echo "skiprestorepackages - skip package restore"
571+
echo "crossgen - Precompiles the framework managed assemblies in coreroot"
502572
echo "runtests - run tests after building them"
503573
echo "bindir - output directory (defaults to $__ProjectRoot/bin)"
504574
echo "msbuildonunsupportedplatform - build managed binaries even if distro is not officially supported."
@@ -630,6 +700,7 @@ __GenerateLayoutOnly=
630700
__GenerateTestHostOnly=
631701
__priority1=
632702
__BuildTestWrappersOnly=
703+
__DoCrossgen=0
633704
CORE_ROOT=
634705

635706
while :; do
@@ -808,6 +879,10 @@ while :; do
808879
__SkipRestorePackages=1
809880
;;
810881

882+
crossgen)
883+
__DoCrossgen=1
884+
;;
885+
811886
bindir)
812887
if [ -n "$2" ]; then
813888
__RootBinDir="$2"

dependencies.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@
2121
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
2222
<StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
2323

24-
<PreReleaseLabel>preview4</PreReleaseLabel>
24+
<PreReleaseLabel>preview5</PreReleaseLabel>
2525
</PropertyGroup>
2626

2727
<!-- Source of truth for dependency tooling: the commit hash of the dotnet/versions master branch as of the last auto-upgrade. -->
2828
<PropertyGroup>
29-
<CoreClrCurrentRef>effbce0711085d54a498120d91e0bddbb9f8d8ad</CoreClrCurrentRef>
30-
<BuildToolsCurrentRef>79eb261c83005ea1c93c7861d374d1dd16a07353</BuildToolsCurrentRef>
29+
<CoreClrCurrentRef>caa82199af6a08425d93d3ab3a4b1cb9750ed6b3</CoreClrCurrentRef>
30+
<BuildToolsCurrentRef>66f3bb05de8ac6063fbedff5816ef25cc6ecfa11</BuildToolsCurrentRef>
3131
</PropertyGroup>
3232

3333
<!-- Tests/infrastructure dependency versions. -->
3434
<PropertyGroup>
35-
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>3.0.0-preview4-27603-71</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
35+
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>3.0.0-preview5-27607-72</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
3636
<XunitPackageVersion>2.4.1</XunitPackageVersion>
3737
<XunitPerformanceApiPackageVersion>1.0.0-beta-build0015</XunitPerformanceApiPackageVersion>
3838
<MicrosoftDiagnosticsTracingTraceEventPackageVersion>2.0.36</MicrosoftDiagnosticsTracingTraceEventPackageVersion>

eng/Version.Details.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
<ProductDependencies>
44
</ProductDependencies>
55
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19202.13">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19207.1">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>764f362c8e92e41905fe5f6c782ab9980c86c909</Sha>
8+
<Sha>b1f9e12fe3ee71c48ea60b15968745850ac0a4a7</Sha>
99
</Dependency>
10-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19202.13">
10+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19207.1">
1111
<Uri>https://github.com/dotnet/arcade</Uri>
12-
<Sha>764f362c8e92e41905fe5f6c782ab9980c86c909</Sha>
12+
<Sha>b1f9e12fe3ee71c48ea60b15968745850ac0a4a7</Sha>
1313
</Dependency>
14-
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="4.6.0-preview4.19201.9">
14+
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="4.6.0-preview5.19208.1">
1515
<Uri>https://github.com/dotnet/corefx</Uri>
16-
<Sha>85cec01822bc70fbc45a25001997b0c1e71b1d22</Sha>
16+
<Sha>87fdc75beacc76e02c8e572ae3b0613b418200eb</Sha>
1717
</Dependency>
18-
<Dependency Name="Microsoft.NETCore.Platforms" Version="3.0.0-preview4.19201.9">
18+
<Dependency Name="Microsoft.NETCore.Platforms" Version="3.0.0-preview5.19208.1">
1919
<Uri>https://github.com/dotnet/corefx</Uri>
20-
<Sha>85cec01822bc70fbc45a25001997b0c1e71b1d22</Sha>
20+
<Sha>87fdc75beacc76e02c8e572ae3b0613b418200eb</Sha>
2121
</Dependency>
22-
<Dependency Name="Microsoft.NETCore.App" Version="3.0.0-preview4-27602-14">
22+
<Dependency Name="Microsoft.NETCore.App" Version="3.0.0-preview4-27604-13">
2323
<Uri>https://github.com/dotnet/core-setup</Uri>
24-
<Sha>8fa16d3d543ffa2babd5c8a45b5f29ec2cbdf55f</Sha>
24+
<Sha>209213958004859a79ca586e7b278b5c7fe1f4b0</Sha>
2525
</Dependency>
2626
<Dependency Name="optimization.IBC.CoreCLR" Version="99.99.99-master-20190313.3">
2727
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>

eng/Versions.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<UsingToolXliff>false</UsingToolXliff>
99
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
1010
<MicrosoftNetFrameworkReferenceAssembliesVersion>1.0.0-alpha-004</MicrosoftNetFrameworkReferenceAssembliesVersion>
11-
<MicrosoftPrivateCoreFxNETCoreAppVersion>4.6.0-preview4.19201.9</MicrosoftPrivateCoreFxNETCoreAppVersion>
12-
<MicrosoftNETCorePlatformsVersion>3.0.0-preview4.19201.9</MicrosoftNETCorePlatformsVersion>
13-
<MicrosoftNETCoreAppVersion>3.0.0-preview4-27602-14</MicrosoftNETCoreAppVersion>
11+
<MicrosoftPrivateCoreFxNETCoreAppVersion>4.6.0-preview5.19208.1</MicrosoftPrivateCoreFxNETCoreAppVersion>
12+
<MicrosoftNETCorePlatformsVersion>3.0.0-preview5.19208.1</MicrosoftNETCorePlatformsVersion>
13+
<MicrosoftNETCoreAppVersion>3.0.0-preview4-27604-13</MicrosoftNETCoreAppVersion>
1414
<optimizationIBCCoreCLRVersion>99.99.99-master-20190313.3</optimizationIBCCoreCLRVersion>
1515
<optimizationPGOCoreCLRVersion>99.99.99-master-20190313.3</optimizationPGOCoreCLRVersion>
1616
</PropertyGroup>

eng/common/PublishToPackageFeed.proj

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
<!--
2-
This MSBuild file is intended to be used as the body of the default
3-
publishing release pipeline. The release pipeline will use this file
4-
to invoke the PushToStaticFeed task that will read the build asset
5-
manifest and publish the assets described in the manifest to
6-
informed target feeds.
7-
-->
1+
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
82
<Project Sdk="Microsoft.NET.Sdk">
3+
<!--
4+
This MSBuild file is intended to be used as the body of the default
5+
publishing release pipeline. The release pipeline will use this file
6+
to invoke the PushToStaticFeed task that will read the build asset
7+
manifest and publish the assets described in the manifest to
8+
informed target feeds.
9+
-->
10+
911
<PropertyGroup>
1012
<TargetFramework>netcoreapp2.1</TargetFramework>
1113
</PropertyGroup>
@@ -41,6 +43,16 @@
4143
<PropertyGroup>
4244
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == '.NETCORE'">https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json</TargetStaticFeed>
4345
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == '.NETCOREVALIDATION'">https://dotnetfeed.blob.core.windows.net/arcade-validation/index.json</TargetStaticFeed>
46+
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETCORE'">https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json</TargetStaticFeed>
47+
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETCORETOOLING'">https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json</TargetStaticFeed>
48+
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ENTITYFRAMEWORKCORE'">https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json</TargetStaticFeed>
49+
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'ASPNETEXTENSIONS'">https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json</TargetStaticFeed>
50+
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'CORECLR'">https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/index.json</TargetStaticFeed>
51+
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'CORESDK'">https://dotnetfeed.blob.core.windows.net/dotnet-sdk/index.json</TargetStaticFeed>
52+
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'TOOLSINTERNAL'">https://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json</TargetStaticFeed>
53+
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'TOOLSET'">https://dotnetfeed.blob.core.windows.net/dotnet-toolset/index.json</TargetStaticFeed>
54+
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'WINDOWSDESKTOP'">https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json</TargetStaticFeed>
55+
<TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == 'NUGETCLIENT'">https://dotnetfeed.blob.core.windows.net/nuget-nugetclient/index.json</TargetStaticFeed>
4456
</PropertyGroup>
4557

4658
<Error

0 commit comments

Comments
 (0)