-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix InlineArray and some other corner cases in Swift lowering (#99337)
- Loading branch information
1 parent
fa49755
commit 3b8d8da
Showing
18 changed files
with
370 additions
and
172 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...oreclr/nativeaot/Test.CoreLib/src/System/Runtime/CompilerServices/InlineArrayAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace System.Runtime.CompilerServices | ||
{ | ||
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)] | ||
public sealed class InlineArrayAttribute : Attribute | ||
{ | ||
public InlineArrayAttribute(int length) | ||
{ | ||
Length = length; | ||
} | ||
|
||
public int Length { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/coreclr/tools/Common/TypeSystem/Common/ImpliedRepeatedFieldDesc.Sorting.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace Internal.TypeSystem | ||
{ | ||
public sealed partial class ImpliedRepeatedFieldDesc : FieldDesc | ||
{ | ||
protected internal override int CompareToImpl(FieldDesc other, TypeSystemComparer comparer) | ||
{ | ||
var impliedRepeatedFieldDesc = (ImpliedRepeatedFieldDesc)other; | ||
|
||
int result = comparer.Compare(_underlyingFieldDesc, impliedRepeatedFieldDesc._underlyingFieldDesc); | ||
|
||
if (result != 0) | ||
{ | ||
return result; | ||
} | ||
|
||
return FieldIndex.CompareTo(impliedRepeatedFieldDesc.FieldIndex); | ||
} | ||
|
||
protected internal override int ClassCode => 31666958; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.