1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
//! # `StandAloneSig` Table Loader
//!
//! This module provides loading functionality for the `StandAloneSig` metadata table (ID 0x11).
//! The `StandAloneSig` table contains standalone signatures that are not directly associated
//! with methods, fields, or properties, but are referenced from CIL instructions or used
//! in complex signature scenarios throughout .NET assemblies.
//!
//! ## Purpose
//!
//! The `StandAloneSig` table serves several critical functions:
//! - **Method Signatures**: Stores signatures for method pointers and function calls
//! - **Local Variable Signatures**: Contains local variable type information for methods
//! - **Dynamic Signatures**: Supports runtime signature generation and manipulation
//! - **CIL Instruction Support**: Provides signatures referenced by CIL instructions
//!
//! ## Dependencies
//!
//! - **`TypeDef` Table**: Required for type definition resolution
//! - **`TypeRef` Table**: Required for external type resolution
//! - **`TypeSpec` Table**: Required for constructed type resolution
//! - **`MethodDef` Table**: Required for method context during signature processing
//!
//! ## Signature Types
//!
//! `StandAloneSig` entries can contain:
//! - **Method Signatures**: Function pointer and delegate signatures
//! - **Local Variable Signatures**: Local variable type declarations
//! - **Field Signatures**: Standalone field type information
//! - **Generic Signatures**: Generic type and method instantiations
//!
//! ## References
//!
//! - ECMA-335, Partition II, ยง22.39 - `StandAloneSig` table specification
//! - [`crate::metadata::tables::StandAloneSigRaw`] - Raw table entry structure
//! - [`crate::metadata::tables::StandAloneSig`] - Owned table entry type
use Arc;
use ;
use crate::;
/// Loader implementation for the `StandAloneSig` metadata table.
///
/// This loader processes `StandAloneSig` table entries (ID 0x11) that contain standalone
/// signatures for method pointers, local variables, and other signature scenarios.
/// It handles the loading, parsing, and integration of signatures with method definitions
/// and type system components.
///
/// ## Error Handling
///
/// The loader validates:
/// - Signature blob format and structure
/// - Type reference validity and accessibility
/// - Method signature compatibility and constraints
/// - Generic parameter consistency and bounds
///
pub ;