Skip to content

Commit

Permalink
[runtime] Sync b20f704 → ef6283a
Browse files Browse the repository at this point in the history
Diff: https://github.com/dotnet/runtime/compare/b20f704cc00f390e5560a137deb8f0e64e863e1d..ef6283ac0a14c78d9e9fef4841545099bd7ad12b

From: dotnet/runtime@b20f704
To: dotnet/runtime@ef6283a

Commits:
  - Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230928.3 (#92816)
    dotnet/runtime@f1e4e90
  - Changes from dotnet/runtime#92630 (#92753)
    dotnet/runtime@8632a75
  - [release/8.0] [browser] Remove duplicated marshaling of return value for JSExport (#92886)
    dotnet/runtime@172d79a
  - fix dotnet/runtime#92713 (#92890)
    dotnet/runtime@8e365ee
  - [release/8.0] Update dependencies from dotnet/roslyn (#92503)
    dotnet/runtime@ef6283a

[[ commit created by automation ]]
  • Loading branch information
dotnet-maestro[bot] committed Oct 3, 2023
1 parent e5b9aac commit 9a21055
Show file tree
Hide file tree
Showing 14 changed files with 173 additions and 109 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ To enable full offline source-building of the VMR, we have no other choice than
- `src/roslyn-analyzers`
*[dotnet/roslyn-analyzers@4a7701f](https://github.com/dotnet/roslyn-analyzers/commit/4a7701fd72094614897b33e4cb1d9640c221d862)*
- `src/runtime`
*[dotnet/runtime@b20f704](https://github.com/dotnet/runtime/commit/b20f704cc00f390e5560a137deb8f0e64e863e1d)*
*[dotnet/runtime@ef6283a](https://github.com/dotnet/runtime/commit/ef6283ac0a14c78d9e9fef4841545099bd7ad12b)*
- `src/sdk`
*[dotnet/sdk@2296937](https://github.com/dotnet/sdk/commit/22969374eed5b2467de56e127f65abfb3627e275)*
- `src/source-build-externals`
Expand Down
4 changes: 2 additions & 2 deletions prereqs/git-info/AllRepoVersions.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<roslynanalyzersOutputPackageVersion>3.11.0-beta1.23472.1</roslynanalyzersOutputPackageVersion>
<roslynGitCommitHash>0d735148bbb4cb511be547fbc1db63a2c81a821d</roslynGitCommitHash>
<roslynOutputPackageVersion>4.8.0-3.23501.1</roslynOutputPackageVersion>
<runtimeGitCommitHash>b20f704cc00f390e5560a137deb8f0e64e863e1d</runtimeGitCommitHash>
<runtimeOutputPackageVersion>8.0.0-rtm.23478.17</runtimeOutputPackageVersion>
<runtimeGitCommitHash>ef6283ac0a14c78d9e9fef4841545099bd7ad12b</runtimeGitCommitHash>
<runtimeOutputPackageVersion>8.0.0-rtm.23502.11</runtimeOutputPackageVersion>
<sdkGitCommitHash>22969374eed5b2467de56e127f65abfb3627e275</sdkGitCommitHash>
<sdkOutputPackageVersion>8.0.100-rtm.23503.4</sdkOutputPackageVersion>
<sourcebuildexternalsGitCommitHash>ed17956dbc31097b7ba6a66be086f4a70a97d84f</sourcebuildexternalsGitCommitHash>
Expand Down
6 changes: 3 additions & 3 deletions prereqs/git-info/runtime.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<GitCommitHash>b20f704cc00f390e5560a137deb8f0e64e863e1d</GitCommitHash>
<OfficialBuildId>20230928.17</OfficialBuildId>
<OutputPackageVersion>8.0.0-rtm.23478.17</OutputPackageVersion>
<GitCommitHash>ef6283ac0a14c78d9e9fef4841545099bd7ad12b</GitCommitHash>
<OfficialBuildId>20231002.11</OfficialBuildId>
<OutputPackageVersion>8.0.0-rtm.23502.11</OutputPackageVersion>
<PreReleaseVersionLabel>rtm</PreReleaseVersionLabel>
<IsStable>false</IsStable>
</PropertyGroup>
Expand Down
36 changes: 18 additions & 18 deletions src/runtime/eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -334,21 +334,21 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>1d451c32dda2314c721adbf8829e1c0cd4e681ff</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.23477.3">
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.23478.3">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>a268dec2bc8ad282a525897b428cf014d5181f77</Sha>
<Sha>492f7464d31d9599531fab2a67bc2422046f5133</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x86.MIBC.Runtime" Version="1.0.0-prerelease.23477.3">
<Dependency Name="optimization.windows_nt-x86.MIBC.Runtime" Version="1.0.0-prerelease.23478.3">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>a268dec2bc8ad282a525897b428cf014d5181f77</Sha>
<Sha>492f7464d31d9599531fab2a67bc2422046f5133</Sha>
</Dependency>
<Dependency Name="optimization.linux-x64.MIBC.Runtime" Version="1.0.0-prerelease.23477.3">
<Dependency Name="optimization.linux-x64.MIBC.Runtime" Version="1.0.0-prerelease.23478.3">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>a268dec2bc8ad282a525897b428cf014d5181f77</Sha>
<Sha>492f7464d31d9599531fab2a67bc2422046f5133</Sha>
</Dependency>
<Dependency Name="optimization.PGO.CoreCLR" Version="1.0.0-prerelease.23477.3">
<Dependency Name="optimization.PGO.CoreCLR" Version="1.0.0-prerelease.23478.3">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>a268dec2bc8ad282a525897b428cf014d5181f77</Sha>
<Sha>492f7464d31d9599531fab2a67bc2422046f5133</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="8.0.0-alpha.0.23475.1">
<Uri>https://github.com/dotnet/hotreload-utils</Uri>
Expand All @@ -358,18 +358,18 @@
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>99168dcff56809205e7ef8530d1256f3a07fab1f</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.8.0-3.23472.2">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.8.0-3.23501.1">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>aa7e4da5341196be494ca4bb0c719d7bef3e396a</Sha>
<Sha>0d735148bbb4cb511be547fbc1db63a2c81a821d</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis" Version="4.8.0-3.23472.2">
<Dependency Name="Microsoft.CodeAnalysis" Version="4.8.0-3.23501.1">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>aa7e4da5341196be494ca4bb0c719d7bef3e396a</Sha>
<Sha>0d735148bbb4cb511be547fbc1db63a2c81a821d</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.8.0-3.23472.2">
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.8.0-3.23501.1">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>aa7e4da5341196be494ca4bb0c719d7bef3e396a</Sha>
<Sha>0d735148bbb4cb511be547fbc1db63a2c81a821d</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.23472.1">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
Expand All @@ -384,13 +384,13 @@
<Sha>d10b02ae5cc670609d920a672985ed4456bdd6b6</Sha>
<SourceBuild RepoName="sdk" ManagedOnly="true" />
</Dependency>
<Dependency Name="optimization.windows_nt-arm64.MIBC.Runtime" Version="1.0.0-prerelease.23477.3">
<Dependency Name="optimization.windows_nt-arm64.MIBC.Runtime" Version="1.0.0-prerelease.23478.3">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>a268dec2bc8ad282a525897b428cf014d5181f77</Sha>
<Sha>492f7464d31d9599531fab2a67bc2422046f5133</Sha>
</Dependency>
<Dependency Name="optimization.linux-arm64.MIBC.Runtime" Version="1.0.0-prerelease.23477.3">
<Dependency Name="optimization.linux-arm64.MIBC.Runtime" Version="1.0.0-prerelease.23478.3">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>a268dec2bc8ad282a525897b428cf014d5181f77</Sha>
<Sha>492f7464d31d9599531fab2a67bc2422046f5133</Sha>
</Dependency>
<!-- Necessary for source-build. This allows the package to be retrieved from previously-source-built artifacts
and flow in as dependencies of the packages produced by runtime. -->
Expand Down
18 changes: 9 additions & 9 deletions src/runtime/eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure
they do not break the local dev experience.
-->
<MicrosoftCodeAnalysisCSharpVersion>4.8.0-3.23472.2</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisVersion>4.8.0-3.23472.2</MicrosoftCodeAnalysisVersion>
<MicrosoftNetCompilersToolsetVersion>4.8.0-3.23472.2</MicrosoftNetCompilersToolsetVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.8.0-3.23501.1</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisVersion>4.8.0-3.23501.1</MicrosoftCodeAnalysisVersion>
<MicrosoftNetCompilersToolsetVersion>4.8.0-3.23501.1</MicrosoftNetCompilersToolsetVersion>
</PropertyGroup>
<!--
For source generator support we need to target multiple versions of Roslyn in order to be able to run on older versions of Roslyn.
Expand Down Expand Up @@ -158,12 +158,12 @@
<SystemWindowsExtensionsTestDataVersion>8.0.0-beta.23421.1</SystemWindowsExtensionsTestDataVersion>
<MicrosoftDotNetCilStripSourcesVersion>8.0.0-beta.23421.1</MicrosoftDotNetCilStripSourcesVersion>
<!-- dotnet-optimization dependencies -->
<optimizationwindows_ntx64MIBCRuntimeVersion>1.0.0-prerelease.23477.3</optimizationwindows_ntx64MIBCRuntimeVersion>
<optimizationwindows_ntx86MIBCRuntimeVersion>1.0.0-prerelease.23477.3</optimizationwindows_ntx86MIBCRuntimeVersion>
<optimizationwindows_ntarm64MIBCRuntimeVersion>1.0.0-prerelease.23477.3</optimizationwindows_ntarm64MIBCRuntimeVersion>
<optimizationlinuxx64MIBCRuntimeVersion>1.0.0-prerelease.23477.3</optimizationlinuxx64MIBCRuntimeVersion>
<optimizationlinuxarm64MIBCRuntimeVersion>1.0.0-prerelease.23477.3</optimizationlinuxarm64MIBCRuntimeVersion>
<optimizationPGOCoreCLRVersion>1.0.0-prerelease.23477.3</optimizationPGOCoreCLRVersion>
<optimizationwindows_ntx64MIBCRuntimeVersion>1.0.0-prerelease.23478.3</optimizationwindows_ntx64MIBCRuntimeVersion>
<optimizationwindows_ntx86MIBCRuntimeVersion>1.0.0-prerelease.23478.3</optimizationwindows_ntx86MIBCRuntimeVersion>
<optimizationwindows_ntarm64MIBCRuntimeVersion>1.0.0-prerelease.23478.3</optimizationwindows_ntarm64MIBCRuntimeVersion>
<optimizationlinuxx64MIBCRuntimeVersion>1.0.0-prerelease.23478.3</optimizationlinuxx64MIBCRuntimeVersion>
<optimizationlinuxarm64MIBCRuntimeVersion>1.0.0-prerelease.23478.3</optimizationlinuxarm64MIBCRuntimeVersion>
<optimizationPGOCoreCLRVersion>1.0.0-prerelease.23478.3</optimizationPGOCoreCLRVersion>
<!-- Not auto-updated. -->
<MicrosoftDiaSymReaderNativeVersion>16.11.29-beta1.23404.4</MicrosoftDiaSymReaderNativeVersion>
<SystemCommandLineVersion>2.0.0-beta4.23307.1</SystemCommandLineVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public JSExportCodeGenerator(

public BlockSyntax GenerateJSExportBody()
{
StatementSyntax invoke = InvokeSyntax();
List<StatementSyntax> invoke = InvokeSyntax();
GeneratedStatements statements = GeneratedStatements.Create(_marshallers, _context);
bool shouldInitializeVariables = !statements.GuaranteedUnmarshal.IsEmpty || !statements.CleanupCallerAllocated.IsEmpty || !statements.CleanupCalleeAllocated.IsEmpty;
VariableDeclarations declarations = VariableDeclarations.GenerateDeclarationsForUnmanagedToManaged(_marshallers, _context, shouldInitializeVariables);
Expand All @@ -79,7 +79,7 @@ public BlockSyntax GenerateJSExportBody()
var tryStatements = new List<StatementSyntax>();
tryStatements.AddRange(statements.Unmarshal);

tryStatements.Add(invoke);
tryStatements.AddRange(invoke);

if (!(statements.GuaranteedUnmarshal.IsEmpty && statements.CleanupCalleeAllocated.IsEmpty))
{
Expand All @@ -93,23 +93,33 @@ public BlockSyntax GenerateJSExportBody()
tryStatements.AddRange(statements.Marshal);

List<StatementSyntax> allStatements = setupStatements;

// Wrap unmarshall, invocation and return value marshalling in try-catch.
// In case of exception, marshal exception instead of return value.
var tryInvokeAndMarshal = TryStatement(SingletonList(CatchClause()
.WithDeclaration(CatchDeclaration(IdentifierName(Constants.ExceptionGlobal)).WithIdentifier(Identifier("ex")))
.WithBlock(Block(SingletonList<StatementSyntax>(
ExpressionStatement(InvocationExpression(
MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression,
IdentifierName(Constants.ArgumentException), IdentifierName(Constants.ToJSMethod)))
.WithArgumentList(ArgumentList(SingletonSeparatedList(Argument(IdentifierName("ex")))))))))))
.WithBlock(Block(tryStatements));

List<StatementSyntax> finallyStatements = new List<StatementSyntax>();
if (!(statements.GuaranteedUnmarshal.IsEmpty && statements.CleanupCalleeAllocated.IsEmpty))
{
finallyStatements.Add(IfStatement(IdentifierName(InvokeSucceededIdentifier), Block(statements.GuaranteedUnmarshal.Concat(statements.CleanupCalleeAllocated))));
}

finallyStatements.AddRange(statements.CleanupCallerAllocated);

if (finallyStatements.Count > 0)
{
allStatements.Add(
TryStatement(Block(tryStatements), default, FinallyClause(Block(finallyStatements))));
}
else
{
allStatements.AddRange(tryStatements);
tryInvokeAndMarshal = TryStatement(Block(tryInvokeAndMarshal), default, FinallyClause(Block(finallyStatements)));
}

allStatements.Add(tryInvokeAndMarshal);

return Block(allStatements);
}

Expand Down Expand Up @@ -175,7 +185,7 @@ private void SetupSyntax(List<StatementSyntax> statementsToUpdate)
Argument(LiteralExpression(SyntaxKind.NumericLiteralExpression, Literal(1)))))))))))));
}

private TryStatementSyntax InvokeSyntax()
private List<StatementSyntax> InvokeSyntax()
{
var statements = new List<StatementSyntax>();
var arguments = new List<ArgumentSyntax>();
Expand Down Expand Up @@ -205,16 +215,8 @@ private TryStatementSyntax InvokeSyntax()
IdentifierName(nativeIdentifier), invocation));

statements.Add(statement);
statements.AddRange(_marshallers.ManagedReturnMarshaller.Generator.Generate(_marshallers.ManagedReturnMarshaller.TypeInfo, _context with { CurrentStage = StubCodeContext.Stage.Marshal }));
}
return TryStatement(SingletonList(CatchClause()
.WithDeclaration(CatchDeclaration(IdentifierName(Constants.ExceptionGlobal)).WithIdentifier(Identifier("ex")))
.WithBlock(Block(SingletonList<StatementSyntax>(
ExpressionStatement(InvocationExpression(
MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression,
IdentifierName(Constants.ArgumentException), IdentifierName(Constants.ToJSMethod)))
.WithArgumentList(ArgumentList(SingletonSeparatedList(Argument(IdentifierName("ex")))))))))))
.WithBlock(Block(statements));
return statements;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,16 +348,14 @@ private void BuildAndSetProperties((X509Certificate2, int)[] elementTuples)

for (int i = 0; i < elementTuples.Length; i++)
{
(X509Certificate2, int) tuple = elementTuples[i];
(X509Certificate2 cert, int chainStatus) = elementTuples[i];

elements[i] = BuildElement(tuple.Item1, tuple.Item2);
allStatus |= tuple.Item2;
elements[i] = new X509ChainElement(cert, BuildChainElementStatuses(cert, chainStatus), "");
allStatus |= chainStatus;
}

ChainElements = elements;

X509ChainElement rollupElement = BuildElement(null!, allStatus);
ChainStatus = rollupElement.ChainElementStatus;
ChainStatus = BuildChainElementStatuses(null, allStatus);
}

private static void FixupRevocationStatus(
Expand Down Expand Up @@ -457,11 +455,11 @@ private static X509ChainStatusFlags FindUntrustedRootReason(X509Certificate2 cer
return X509ChainStatusFlags.UntrustedRoot;
}

private X509ChainElement BuildElement(X509Certificate2 cert, int dwStatus)
private X509ChainStatus[] BuildChainElementStatuses(X509Certificate2? cert, int dwStatus)
{
if (dwStatus == 0)
{
return new X509ChainElement(cert, Array.Empty<X509ChainStatus>(), "");
return Array.Empty<X509ChainStatus>();
}

List<X509ChainStatus> statuses = new List<X509ChainStatus>();
Expand Down Expand Up @@ -499,7 +497,7 @@ private X509ChainElement BuildElement(X509Certificate2 cert, int dwStatus)
}
}

return new X509ChainElement(cert, statuses.ToArray(), "");
return statuses.ToArray();
}

private readonly struct X509ChainErrorMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,14 @@ private static async Task<IList<JObject>> ResolveElementAccess(ExpressionSyntaxR
{
var values = new List<JObject>();
JObject index = null;
List<JObject> nestedIndexers = new();
IEnumerable<ElementAccessExpressionSyntax> elementAccesses = replacer.elementAccess;
foreach (ElementAccessExpressionSyntax elementAccess in elementAccesses.Reverse())
{
index = await resolver.Resolve(elementAccess, replacer.memberAccessValues, index, replacer.variableDefinitions, token);
index = await resolver.Resolve(elementAccess, replacer.memberAccessValues, nestedIndexers, replacer.variableDefinitions, token);
if (index == null)
throw new ReturnAsErrorException($"Failed to resolve element access for {elementAccess}", "ReferenceError");
nestedIndexers.Add(index);
}
values.Add(index);
return values;
Expand Down
Loading

0 comments on commit 9a21055

Please sign in to comment.