Skip to content

Commit 0cd7f25

Browse files
committed
Merge branch 'main' into wasi_timer
2 parents 62de364 + c2d0589 commit 0cd7f25

File tree

205 files changed

+8111
-15009
lines changed

Some content is hidden

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

205 files changed

+8111
-15009
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Ports have a weaker contribution bar, at least initially. A functionally correct
200200

201201
#### Copying Files from Other Projects
202202

203-
The .NET runtime uses some files from other projects, typically where a binary distribution does not exist or would be inconvenient.
203+
The .NET runtime uses some files from other projects, per [copyright](./docs/project/copyright.md) rules.
204204

205205
The following rules must be followed for PRs that include files from another project:
206206

docs/project/copyright.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ We use the following approach for code contributions:
1616
- We will typically reject the use of product code licensed with [Creative Commons](https://creativecommons.org/) or [public domain licenses](https://en.wikipedia.org/wiki/Public-domain-equivalent_license) given their lack of universal acceptance.
1717
- The [.NET Foundation Contribution License Agreement (CLA)](https://cla.dotnetfoundation.org) is used to license contributions from contributors.
1818

19+
More mechanical guidance is provided in [CONTRIBUTING.md](../../CONTRIBUTING.md#copying-files-from-other-projects).
20+
1921
References:
2022

2123
- https://opensource.org/faq#cc-zero

eng/Version.Details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,13 +368,13 @@
368368
<Uri>https://github.com/dotnet/roslyn</Uri>
369369
<Sha>1633d219fd06f82c45ef6eb226305839e5003960</Sha>
370370
</Dependency>
371-
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24378.1">
371+
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24402.1">
372372
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
373-
<Sha>81d9b5d58e3d384ed4a91b75f4a1ece6352e76d9</Sha>
373+
<Sha>b70b32099c2365092974f6786636e25ae507c8fa</Sha>
374374
</Dependency>
375-
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0-preview.24378.1">
375+
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0-preview.24402.1">
376376
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
377-
<Sha>81d9b5d58e3d384ed4a91b75f4a1ece6352e76d9</Sha>
377+
<Sha>b70b32099c2365092974f6786636e25ae507c8fa</Sha>
378378
</Dependency>
379379
<!-- Intermediate is necessary for source build. -->
380380
<Dependency Name="Microsoft.SourceBuild.Intermediate.roslyn" Version="4.12.0-2.24379.16">

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
</ItemGroup>
3535
<PropertyGroup>
3636
<!-- dotnet/roslyn-analyzers dependencies -->
37-
<MicrosoftCodeAnalysisAnalyzersVersion>3.11.0-beta1.24378.1</MicrosoftCodeAnalysisAnalyzersVersion>
38-
<MicrosoftCodeAnalysisNetAnalyzersVersion>9.0.0-preview.24378.1</MicrosoftCodeAnalysisNetAnalyzersVersion>
37+
<MicrosoftCodeAnalysisAnalyzersVersion>3.11.0-beta1.24402.1</MicrosoftCodeAnalysisAnalyzersVersion>
38+
<MicrosoftCodeAnalysisNetAnalyzersVersion>9.0.0-preview.24402.1</MicrosoftCodeAnalysisNetAnalyzersVersion>
3939
<!-- dotnet/roslyn dependencies -->
4040
<!--
4141
These versions should not be used by any project that contributes to the design-time experience in VS, such as an analyzer, code-fix, or generator assembly.

eng/pipelines/coreclr/templates/build-perf-bdn-app.yml

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ parameters:
1717
archiveType: ''
1818
tarCompression: ''
1919
framework: 'net9.0' # Framework version to get versions for and build for
20-
perfRepo: 'main' # Perf repo to pull for the PerfLabExporter
20+
perfBranch: 'main' # Performance branch to use for cloning
2121

2222

2323
steps:
@@ -57,20 +57,6 @@ steps:
5757
overwriteExistingFiles: true
5858
cleanDestinationFolder: false
5959

60-
- script: |
61-
echo '{ }' > ./global.json
62-
curl -o NuGet.config 'https://raw.githubusercontent.com/dotnet/maui/${{parameters.framework}}/NuGet.config'
63-
curl -o dotnet-install.sh 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh'
64-
curl -Lo maui-supported-sdk-version.json 'https://maui.blob.core.windows.net/metadata/sdks/${{parameters.framework}}.json'
65-
version=$(sed -nr 's/\s*"version": "(.*)"/\1/p' ./maui-supported-sdk-version.json)
66-
chmod -R a+rx .
67-
./dotnet-install.sh --version $version --install-dir .
68-
./dotnet --info
69-
./dotnet workload install maui --from-rollback-file https://maui.blob.core.windows.net/metadata/rollbacks/${{parameters.framework}}.json --configfile NuGet.config
70-
./dotnet workload install android --from-rollback-file https://maui.blob.core.windows.net/metadata/rollbacks/${{parameters.framework}}.json --configfile NuGet.config
71-
displayName: Install MAUI workload
72-
workingDirectory: $(Build.SourcesDirectory)
73-
7460
- script: $(Build.SourcesDirectory)/eng/testing/performance/create-provisioning-profile.sh
7561
displayName: Create iOS code signing and provisioning profile
7662

@@ -84,10 +70,33 @@ steps:
8470
- script: |
8571
set -x
8672
pwd
87-
git clone https://github.com/dotnet/performance.git --depth 1 -b ${{parameters.perfRepo}} --single-branch
73+
git clone https://github.com/dotnet/performance.git --depth 1 -b ${{parameters.perfBranch}} --single-branch
8874
displayName: Clone performance
8975
workingDirectory: $(Build.SourcesDirectory)
9076
77+
- script: |
78+
pwd
79+
echo '$(Build.SourcesDirectory)/rollback.json'
80+
export PYTHONPATH=$PYTHONPATH:$(Build.SourcesDirectory)/performance/scripts:$(Build.SourcesDirectory)/performance/src/scenarios
81+
python -c "import mauisharedpython; roll_dict = mauisharedpython.generate_maui_rollback_dict(); mauisharedpython.dump_dict_to_json_file(roll_dict, '$(Build.SourcesDirectory)/rollback.json')"
82+
displayName: Generate rollback.json
83+
workingDirectory: $(Build.SourcesDirectory)/performance/src/scenarios/shared
84+
85+
- script: |
86+
echo '{ }' > ./global.json
87+
curl -o NuGet.config 'https://raw.githubusercontent.com/dotnet/maui/${{parameters.framework}}/NuGet.config'
88+
curl -o dotnet-install.sh 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh'
89+
curl -Lo performance-version-details.xml 'https://raw.githubusercontent.com/dotnet/performance/${{parameters.perfBranch}}/eng/Version.Details.xml'
90+
version=$(sed -nr 's/[[:space:]]*<Dependency Name="VS.Tools.Net.Core.SDK.Resolver" Version="(.*)"[[:space:]].*/\1/p' ./performance-version-details.xml)
91+
echo dotnet-version: $version
92+
chmod -R a+rx .
93+
./dotnet-install.sh --version $version --install-dir .
94+
./dotnet --info
95+
./dotnet workload install maui --from-rollback-file rollback.json --configfile NuGet.config
96+
./dotnet workload install android --from-rollback-file rollback.json --configfile NuGet.config
97+
displayName: Install MAUI workload
98+
workingDirectory: $(Build.SourcesDirectory)
99+
91100
- pwsh: |
92101
$BenchmarkDotNetVersionCapture = Get-Content .\performance\eng\Versions.props | Select-String -Pattern '<BenchmarkDotNetVersion>(.+?)</BenchmarkDotNetVersion>'
93102
if ($BenchmarkDotNetVersionCapture.Length -eq 0) {

src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@
231231
<Compile Include="$(BclSourcesRoot)\System\Threading\ThreadPool.CoreCLR.cs" />
232232
<Compile Include="$(BclSourcesRoot)\System\Threading\WaitHandle.CoreCLR.cs" />
233233
<Compile Include="$(BclSourcesRoot)\System\Type.CoreCLR.cs" />
234+
<Compile Include="$(BclSourcesRoot)\System\ThrowHelper.cs" />
234235
<Compile Include="$(BclSourcesRoot)\System\TypedReference.CoreCLR.cs" />
235236
<Compile Include="$(BclSourcesRoot)\System\TypeLoadException.CoreCLR.cs" />
236237
<Compile Include="$(BclSourcesRoot)\System\ValueType.cs" />

src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,7 @@ public static int GetGeneration(WeakReference wo)
291291
object? obj = GCHandle.InternalGet(wo.WeakHandle);
292292
KeepAlive(wo);
293293

294-
if (obj is null)
295-
{
296-
throw new ArgumentNullException(nameof(wo));
297-
}
294+
ArgumentNullException.ThrowIfNull(obj, nameof(wo));
298295

299296
return GetGeneration(obj);
300297
}

src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ private void AddOneArgTypeHelper(Type clsArgument, Type[]? requiredCustomModifie
276276
{
277277
for (int i = 0; i < optionalCustomModifiers.Length; i++)
278278
{
279-
Type t = optionalCustomModifiers[i] ??
280-
throw new ArgumentNullException(nameof(optionalCustomModifiers));
279+
Type t = optionalCustomModifiers[i];
280+
ArgumentNullException.ThrowIfNull(t, nameof(optionalCustomModifiers));
281281

282282
if (t.HasElementType)
283283
throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(optionalCustomModifiers));

src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeCustomAttributeData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,7 @@ private static object CreateCustomAttributeInstance(RuntimeModule module, Runtim
18791879
{
18801880
if (module is null)
18811881
{
1882-
throw new ArgumentNullException(SR.Arg_InvalidHandle);
1882+
throw new ArgumentNullException(null, SR.Arg_InvalidHandle);
18831883
}
18841884

18851885
object? result = null;
@@ -1909,7 +1909,7 @@ private static void GetPropertyOrFieldData(
19091909
{
19101910
if (module is null)
19111911
{
1912-
throw new ArgumentNullException(SR.Arg_InvalidHandle);
1912+
throw new ArgumentNullException(null, SR.Arg_InvalidHandle);
19131913
}
19141914

19151915
string? nameLocal = null;
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System.Diagnostics.CodeAnalysis;
5+
using System.Runtime.CompilerServices;
6+
using System.Runtime.InteropServices;
7+
8+
namespace System
9+
{
10+
internal static unsafe partial class ThrowHelper
11+
{
12+
[DoesNotReturn]
13+
[LibraryImport(RuntimeHelpers.QCall, EntryPoint = "ExceptionNative_ThrowAmbiguousResolutionException")]
14+
private static partial void ThrowAmbiguousResolutionException(MethodTable* targetType, MethodTable* interfaceType, void* methodDesc);
15+
16+
[DoesNotReturn]
17+
internal static void ThrowAmbiguousResolutionException(
18+
void* method, // MethodDesc*
19+
void* interfaceType, // MethodTable*
20+
void* targetType) // MethodTable*
21+
{
22+
ThrowAmbiguousResolutionException((MethodTable*)targetType, (MethodTable*)interfaceType, method);
23+
}
24+
25+
[DoesNotReturn]
26+
[LibraryImport(RuntimeHelpers.QCall, EntryPoint = "ExceptionNative_ThrowEntryPointNotFoundException")]
27+
private static partial void ThrowEntryPointNotFoundException(MethodTable* targetType, MethodTable* interfaceType, void* methodDesc);
28+
29+
[DoesNotReturn]
30+
internal static void ThrowEntryPointNotFoundException(
31+
void* method, // MethodDesc*
32+
void* interfaceType, // MethodTable*
33+
void* targetType) // MethodTable*
34+
{
35+
ThrowEntryPointNotFoundException((MethodTable*)targetType, (MethodTable*)interfaceType, method);
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)