| 1 | // Copyright (c) 2026 Alexander Medvednikov. All rights reserved. |
| 2 | // Use of this source code is governed by an MIT license |
| 3 | // that can be found in the LICENSE file. |
| 4 | |
| 5 | module ssa |
| 6 | |
| 7 | pub enum CallConv { |
| 8 | c_decl |
| 9 | fast_call |
| 10 | wasm_std |
| 11 | } |
| 12 | |
| 13 | pub enum Linkage { |
| 14 | external |
| 15 | private |
| 16 | internal |
| 17 | } |
| 18 | |
| 19 | pub struct Function { |
| 20 | pub: |
| 21 | id int |
| 22 | name string |
| 23 | typ TypeID |
| 24 | pub mut: |
| 25 | blocks []BlockID |
| 26 | params []ValueID |
| 27 | is_c_extern bool // C-language extern function (no V body, provided by C headers/libraries) |
| 28 | is_prototype bool // Registered declaration/signature whose body has not been materialized |
| 29 | |
| 30 | linkage Linkage |
| 31 | call_conv CallConv |
| 32 | } |
| 33 | |