Delete an unused Span class from object.h (#89464)
authorSingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Tue, 25 Jul 2023 22:40:47 +0000 (01:40 +0300)
committerGitHub <noreply@github.com>
Tue, 25 Jul 2023 22:40:47 +0000 (15:40 -0700)
src/coreclr/vm/object.h

index 5c02f5b..9bf9dba 100644 (file)
@@ -740,39 +740,6 @@ public:
 
 #define OFFSETOF__PtrArray__m_Array_              ARRAYBASE_SIZE
 
-/* Corresponds to the managed Span<T> and ReadOnlySpan<T> types.
-   This should only ever be passed from the managed to the unmanaged world byref,
-   as any copies of this struct made within the unmanaged world will not observe
-   potential GC relocations of the source data. */
-template < class KIND >
-class Span
-{
-private:
-    /* Keep fields below in sync with managed Span / ReadOnlySpan layout. */
-    KIND* _reference;
-    unsigned int _length;
-
-public:
-    // !! CAUTION !!
-    // Caller must take care not to reassign returned reference if this span corresponds
-    // to a managed ReadOnlySpan<T>. If KIND is a reference type, caller must use a
-    // helper like SetObjectReference instead of assigning values directly to the
-    // reference location.
-    KIND& GetAt(SIZE_T index)
-    {
-        LIMITED_METHOD_CONTRACT;
-        SUPPORTS_DAC;
-        _ASSERTE(index < GetLength());
-        return _reference[index];
-    }
-
-    // Gets the length (in elements) of this span.
-    __inline SIZE_T GetLength() const
-    {
-        return _length;
-    }
-};
-
 /* a TypedByRef is a structure that is used to implement VB's BYREF variants.
    it is basically a tuple of an address of some data along with a TypeHandle
    that indicates the type of the address */