v / vlib / v2 / ssa / function.v
32 lines · 27 sloc · 629 bytes · 81a5657604ec6da99c25e26546870c6888d6fdde
Raw
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
5module ssa
6
7pub enum CallConv {
8 c_decl
9 fast_call
10 wasm_std
11}
12
13pub enum Linkage {
14 external
15 private
16 internal
17}
18
19pub struct Function {
20pub:
21 id int
22 name string
23 typ TypeID
24pub 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