Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Make Vector64<T>, Vector128<T>, and Vector256<T> readonly #19251

Merged
merged 1 commit into from
Aug 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ namespace System.Runtime.Intrinsics
[DebuggerDisplay("{DisplayString,nq}")]
[DebuggerTypeProxy(typeof(Vector128DebugView<>))]
[StructLayout(LayoutKind.Sequential, Size = 16)]
public struct Vector128<T> where T : struct
public readonly struct Vector128<T> where T : struct
{
// These fields exist to ensure the alignment is 8, rather than 1.
// This also allows the debug view to work https://github.com/dotnet/coreclr/issues/15694)
private ulong _00;
private ulong _01;
private readonly ulong _00;
private readonly ulong _01;

private unsafe string DisplayString
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

namespace System.Runtime.Intrinsics
{
internal struct Vector128DebugView<T> where T : struct
internal readonly struct Vector128DebugView<T> where T : struct
{
private Vector128<T> _value;
private readonly Vector128<T> _value;

public Vector128DebugView(Vector128<T> value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ namespace System.Runtime.Intrinsics
[DebuggerDisplay("{DisplayString,nq}")]
[DebuggerTypeProxy(typeof(Vector256DebugView<>))]
[StructLayout(LayoutKind.Sequential, Size = 32)]
public struct Vector256<T> where T : struct
public readonly struct Vector256<T> where T : struct
{
// These fields exist to ensure the alignment is 8, rather than 1.
// This also allows the debug view to work https://github.com/dotnet/coreclr/issues/15694)
private ulong _00;
private ulong _01;
private ulong _02;
private ulong _03;
private readonly ulong _00;
private readonly ulong _01;
private readonly ulong _02;
private readonly ulong _03;

private unsafe string DisplayString
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

namespace System.Runtime.Intrinsics
{
internal struct Vector256DebugView<T> where T : struct
internal readonly struct Vector256DebugView<T> where T : struct
{
private Vector256<T> _value;
private readonly Vector256<T> _value;

public Vector256DebugView(Vector256<T> value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ namespace System.Runtime.Intrinsics
[DebuggerDisplay("{DisplayString,nq}")]
[DebuggerTypeProxy(typeof(Vector64DebugView<>))]
[StructLayout(LayoutKind.Sequential, Size = 8)]
public struct Vector64<T> where T : struct
public readonly struct Vector64<T> where T : struct
{
// These fields exist to ensure the alignment is 8, rather than 1.
// This also allows the debug view to work https://github.com/dotnet/coreclr/issues/15694)
private ulong _00;
private readonly ulong _00;

private unsafe string DisplayString
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

namespace System.Runtime.Intrinsics
{
internal struct Vector64DebugView<T> where T : struct
internal readonly struct Vector64DebugView<T> where T : struct
{
private Vector64<T> _value;
private readonly Vector64<T> _value;

public Vector64DebugView(Vector64<T> value)
{
Expand Down