manual c function interop

This commit is contained in:
2026-06-11 22:46:12 +02:00
parent 2a79010a57
commit a5ceb727c1
20 changed files with 725 additions and 74 deletions
+24 -7
View File
@@ -7,6 +7,21 @@ import "core:mem"
INVALID_ID :: -1
Calling_Convention :: enum {
Brolang,
C,
}
Implementation :: enum {
Definition,
Declaration,
}
Linkage :: enum {
Internal,
External,
}
Opcode :: enum {
Param,
Const,
@@ -35,13 +50,15 @@ Instruction :: struct {
}
Function :: struct {
link_name: string,
c_abi: bool,
is_main: bool,
param_types: []types.Type,
result: types.Type,
instructions: []Instruction,
problematic: bool,
link_name: string,
calling_convention: Calling_Convention,
implementation: Implementation,
linkage: Linkage,
is_main: bool,
param_types: []types.Type,
result: types.Type,
instructions: []Instruction,
problematic: bool,
}
Global :: struct {