Appearance
| 1 | namespace IR.Values is | |
| 2 | use Semantic.Symbols.Symbol | |
| 3 | ||
| 4 | // A parameter of a literal written with an argument pack spread out | |
| 5 | // has no CLR parameter: the emitted method takes the pack's tuple and | |
| 6 | // unpacks it on entry into a local named for each. Returns that | |
| 7 | // local's name, or null for an argument that keeps its CLR slot. | |
| 8 | packed_parameter_local_for(symbol: Symbol?) -> string? is | |
| 9 | if !symbol? then | |
| 10 | return null | |
| 11 | fi | |
| 12 | ||
| 13 | if let closure: Semantic.Symbols.Closure = symbol.owner then | |
| 14 | if closure.is_packed_parameter(symbol) then | |
| 15 | return "$pack.{symbol.name}" | |
| 16 | fi | |
| 17 | fi | |
| 18 | ||
| 19 | return null | |
| 20 | si | |
| 21 | si |