Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Change ReadOnlySpan indexer to return ref readonly (dotnet/coreclr#14727
Browse files Browse the repository at this point in the history
)

* Change ReadOnlySpan indexer to return ref readonly.

Update JIT to handle changes to ReadOnlySpan indexer

Resolving merge conflict and fixing jit importer

Update ReadOnlySpan Enumerator Current to use indexer.

Removing readonly keyword.

* Temporarily disabling Span perf and other tests that use ReadOnlySpan

* Isolating the ref readonly indexer change only to CoreCLR for now.

Reverting the change to Enumerator Current for now

Fix file formatting

Enable Alpine CI (#15502)

* Enable Alpine CI

This enables Alpine CI leg on every PR using the pipelines.

compare type size instead of var_types

get rid of TYP_CHAR

Adding support for Acosh, Asinh, Atanh, and Cbrt to Math and MathF

Updating the PAL layer to support acosh, asinh, atanh, and cbrt

Adding some PAL tests for acosh, asinh, atanh, and cbrt

Adding valuenum support for acosh, asinh, atanh, and cbrt

Lsra Documentation

Update LinearScan section of ryujit-overview.md, and add lsra-detail.md

Refactor Unsafe.cs to get it more in sync with CoreRT. (#15510)

* Refactor Unsafe.cs to get it more in sync with CoreRT.

* Format the document.

* Unifying the copies of Unsafe using ifdefs

* Change exception thrown to PlatformNotSupportedException

* Addressing PR feedback and moving Unsafe to shared.

* Addressing PR feedback

* Addressing PR review - adding intrinsic attribute

Update CoreClr, CoreFx to preview1-26014-01, preview1-26013-12, respectively (#15513)

Revert "Add optional integer offset to OwnedMemory Pin (#15410)"

This reverts commit 8931cfa.

Get rid of old -altjitcrossgen argument now that CI has been updated

Merge pull request dotnet/corert#5109 from dotnet/nmirror (#15518)

Merge nmirror to master

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>

Revert " Revert "[Local GC] Move knowledge of overlapped I/O objects to the EE through four callbacks (#14982)""

Fix typo `_TARGET_ARM` to `_TARGET_ARM_`. This happens mostly in comments except lsra.cpp.

Update CoreClr, CoreFx, PgoData to preview1-26014-04, preview1-26014-03, master-20171214-0043, respectively (#15520)

* Disabling a test that uses ReadOnlySpan indexer

* Temporarily disabling the superpmi test and fixing nit

* Remove debug statements.
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
  • Loading branch information
ahsonkhan authored and dotnet-bot committed Jan 13, 2018
1 parent 7bbb260 commit 79a7ef4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Common/src/CoreLib/System/ReadOnlySpan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,29 +165,27 @@ public bool IsEmpty
/// <exception cref="System.IndexOutOfRangeException">
/// Thrown when index less than 0 or index greater than or equal to Length
/// </exception>
#if PROJECTN

public ref readonly T this[int index]
{
#if PROJECTN
[BoundsChecking]
get
{
return ref Unsafe.Add(ref _pointer.Value, index);
}
}
#else
public T this[int index]
{
[Intrinsic]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[NonVersionable]
get
{
if ((uint)index >= (uint)_length)
ThrowHelper.ThrowIndexOutOfRangeException();
return Unsafe.Add(ref _pointer.Value, index);
return ref Unsafe.Add(ref _pointer.Value, index);
}
}
#endif
}

/// <summary>
/// Copies the contents of this read-only span into destination span. If the source
Expand Down

0 comments on commit 79a7ef4

Please sign in to comment.