Skip to content

Commit

Permalink
Delete an unused Span class from object.h (#89464)
Browse files Browse the repository at this point in the history
  • Loading branch information
SingleAccretion authored Jul 25, 2023
1 parent 8c51f01 commit 8aff893
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions src/coreclr/vm/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -740,39 +740,6 @@ class PtrArray : public ArrayBase

#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 */
Expand Down

0 comments on commit 8aff893

Please sign in to comment.