@@ -1754,79 +1754,14 @@ struct TargetClassMetadata : public TargetHeapMetadata<Runtime> {
1754
1754
};
1755
1755
using ClassMetadata = TargetClassMetadata<InProcess>;
1756
1756
1757
- // / A key-value pair in a TypeRef -> MetadataSource map.
1758
- struct GenericMetadataSource {
1759
- using Key = RelativeDirectPointer<const char >;
1760
- using Value = Key;
1761
-
1762
- const Key MangledTypeName;
1763
- const Value EncodedMetadataSource;
1764
- };
1765
-
1766
- // / Describes the layout of a heap closure.
1767
- // /
1768
- // / For simplicity's sake and other reasons, this shouldn't contain
1769
- // / architecture-specifically sized things like direct pointers, uintptr_t, etc.
1770
- // /
1771
- // / Following the CaptureDescriptor are:
1772
- // / - a list of direct relative offsets to the mangled type names of the
1773
- // / captures (these aren't in the DATA segment, however).
1774
- // / - a list of GenericMetadataSource objects - each element is a pair of:
1775
- // / - MangledTypeName (for a GenericTypeParameterTypeRef)
1776
- // / - EncodedMetadataSource (an encoded string like TypeRefs, but describe
1777
- // / the method of crawling to the metadata for that generic type parameter.
1778
- struct CaptureDescriptor {
1779
- public:
1780
-
1781
- // / The number of captures in the closure and the number of typerefs that
1782
- // / immediately follow this struct.
1783
- const uint32_t NumCaptures;
1784
-
1785
- // / The number of sources of metadata available in the MetadataSourceMap
1786
- // / directly following the list of capture's typerefs.
1787
- const uint32_t NumMetadataSources;
1788
-
1789
- // / The number of items in the NecessaryBindings structure at the head of
1790
- // / the closure.
1791
- const uint32_t NumBindings;
1792
-
1793
- // / Get the key-value pair for the ith generic metadata source.
1794
- const GenericMetadataSource &getGenericMetadataSource (size_t i) const {
1795
- assert (i <= NumMetadataSources &&
1796
- " Generic metadata source index out of range" );
1797
- auto Begin = getGenericMetadataSourceBuffer ();
1798
- return Begin[i];
1799
- }
1800
-
1801
- // / Get the typeref (encoded as a mangled type name) of the ith
1802
- // / closure capture.
1803
- const RelativeDirectPointer<const char > &
1804
- getCaptureMangledTypeName (size_t i) const {
1805
- assert (i <= NumCaptures && " Capture index out of range" );
1806
- auto Begin = getCaptureTypeRefBuffer ();
1807
- return Begin[i];
1808
- }
1809
-
1810
- private:
1811
- const GenericMetadataSource *getGenericMetadataSourceBuffer () const {
1812
- auto BeginTR = reinterpret_cast <const char *>(getCaptureTypeRefBuffer ());
1813
- auto EndTR = BeginTR + NumCaptures * sizeof (GenericMetadataSource);
1814
- return reinterpret_cast <const GenericMetadataSource *>(EndTR);
1815
- }
1816
-
1817
- const RelativeDirectPointer<const char > *getCaptureTypeRefBuffer () const {
1818
- return reinterpret_cast <const RelativeDirectPointer<const char > *>(this +1 );
1819
- }
1820
- };
1821
-
1822
1757
// / The structure of metadata for heap-allocated local variables.
1823
1758
// / This is non-type metadata.
1824
1759
template <typename Runtime>
1825
1760
struct TargetHeapLocalVariableMetadata
1826
1761
: public TargetHeapMetadata<Runtime> {
1827
1762
using StoredPointer = typename Runtime::StoredPointer;
1828
1763
uint32_t OffsetToFirstCapture;
1829
- TargetPointer<Runtime, CaptureDescriptor > CaptureDescription;
1764
+ TargetPointer<Runtime, const char > CaptureDescription;
1830
1765
};
1831
1766
using HeapLocalVariableMetadata
1832
1767
= TargetHeapLocalVariableMetadata<InProcess>;
0 commit comments