From 0087d6d62e642fb9bda9ea730df68719b7abdd7e Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Sun, 8 Mar 2026 15:05:23 +0100 Subject: [PATCH] Add `preserve/*` to `base:runtime` ```odin none :: proc "preserve/none" () {} most :: proc "preserve/most" () {} all :: proc "preserve/all" () {} print_cc :: proc(type: any) { ti := type_info_of(type.id) p := ti.variant.(runtime.Type_Info_Procedure) fmt.println(p.convention) } main :: proc() { print_cc(none) print_cc(most) print_cc(all) } ``` --- base/runtime/core.odin | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/runtime/core.odin b/base/runtime/core.odin index 2fcc21c97..983f104e3 100644 --- a/base/runtime/core.odin +++ b/base/runtime/core.odin @@ -39,6 +39,10 @@ Calling_Convention :: enum u8 { Win64 = 9, SysV = 10, + + Preserve_None = 11, + Preserve_Most = 12, + Preserve_All = 13, } Type_Info_Enum_Value :: distinct i64