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
//! # Param Table Module
//!
//! This module provides comprehensive access to the **Param** metadata table (ID 0x08),
//! which contains information about method parameters including their names, attributes,
//! sequence numbers, and metadata. Param entries define the components of method signatures
//! and provide parameter-specific information for proper method invocation.
//!
//! ## Overview
//!
//! The Param table manages method parameter information in .NET assemblies:
//! - **Parameter Names**: Human-readable names for method parameters
//! - **Sequence Numbers**: Ordering of parameters within method signatures
//! - **Attributes**: Parameter characteristics (in, out, optional, default values)
//! - **Marshalling**: Information for interop and P/Invoke scenarios
//!
//! This table is essential for understanding method signatures and enabling proper
//! parameter binding during method invocation.
//!
//! ## Components
//!
//! The module implements a dual-representation pattern for optimal performance:
//!
//! - [`ParamRaw`] - Raw table data with unresolved indexes for initial parsing
//! - [`Param`] - Processed data with resolved parameter names
//! - [`ParamLoader`] - Handles conversion between raw and processed representations
//! - [`ParamMap`] - Thread-safe storage mapping tokens to processed entries
//! - [`ParamList`] - Thread-safe collection for sequential access
//!
//! ## Table Structure
//!
//! | Field | Type | Description |
//! |-------|------|-------------|
//! | `Flags` | `u16` | Parameter attributes and characteristics |
//! | `Sequence` | `u16` | Parameter order in method signature (0 = return type) |
//! | `Name` | `u32` | Index into string heap containing parameter name |
//!
//! The sequence number determines parameter ordering, with 0 reserved for the return type
//! and 1+ for actual parameters in declaration order.
//!
//! ## Parameter Attributes
//!
//! The [`crate::metadata::tables::ParamAttributes`] module defines all possible parameter flags:
//!
//! ### Direction Attributes
//! - [`IN`](ParamAttributes::IN) - Parameter is input (passed to method)
//! - [`OUT`](ParamAttributes::OUT) - Parameter is output (returned from method)
//!
//! ### Optional Attributes
//! - [`OPTIONAL`](ParamAttributes::OPTIONAL) - Parameter is optional
//! - [`HAS_DEFAULT`](ParamAttributes::HAS_DEFAULT) - Parameter has default value
//!
//! ### Marshalling Attributes
//! - [`HAS_FIELD_MARSHAL`](ParamAttributes::HAS_FIELD_MARSHAL) - Parameter has marshalling information
//!
//! ## ECMA-335 Specification
//!
//! This implementation follows the ECMA-335 specification:
//! - **§II.22.33** - Param table structure and semantics
//! - **§II.23.1.13** - Parameter attributes flags
//! - **§II.24.2.1** - String heap references
//!
//! For detailed specifications, see [ECMA-335 6th Edition](https://www.ecma-international.org/wp-content/uploads/ECMA-335_6th_edition_june_2012.pdf).
use crateToken;
use SkipMap;
use Arc;
pub use *;
pub use *;
pub use *;
pub use *;
/// Thread-safe map holding the mapping of [`crate::metadata::token::Token`] to parsed [`Param`] entries.
///
/// This concurrent skip list provides efficient O(log n) access to Param entries
/// by their metadata token. Used for resolving parameter information during method processing.
pub type ParamMap = ;
/// Thread-safe vector holding a list of [`Param`] entries.
///
/// Uses a lock-free vector implementation for efficient concurrent access.
/// Provides sequential access to Param entries for iteration and batch processing.
pub type ParamList = ;
/// Reference-counted pointer to a [`Param`] entry.
///
/// Enables efficient sharing of Param data across multiple contexts
/// while maintaining memory safety through automatic reference counting.
pub type ParamRc = ;
/// Parameter attribute flags for the Param table.
///
/// This module defines all possible flags that can be set in the `Flags` field
/// of Param entries according to ECMA-335 §II.23.1.13. These flags control
/// parameter behavior, direction, and characteristics.