aboutsummaryrefslogtreecommitdiff
path: root/src/parser.hpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-06-08 14:33:49 +0100
committergingerBill <bill@gingerbill.org>2021-06-08 14:33:49 +0100
commitf19bb0f4d45ba4352c4392807ca2b1efe5918ea7 (patch)
tree852f3256f8f7e0fd85a95de69cde84b6f17992e5 /src/parser.hpp
parent76bb82a7260158cb1ecd5d2da1b775fbdb1f0b7d (diff)
Make default calling convention code more correct to read
Diffstat (limited to 'src/parser.hpp')
-rw-r--r--src/parser.hpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/parser.hpp b/src/parser.hpp
index 060fd56d3..7c278b304 100644
--- a/src/parser.hpp
+++ b/src/parser.hpp
@@ -208,18 +208,18 @@ enum ProcTag {
ProcTag_optional_second = 1<<6,
};
-enum ProcCallingConvention {
- ProcCC_Invalid = 0,
- ProcCC_Odin = 1,
+enum ProcCallingConvention : i32 {
+ ProcCC_Invalid = 0,
+ ProcCC_Odin = 1,
ProcCC_Contextless = 2,
- ProcCC_CDecl = 3,
- ProcCC_StdCall = 4,
- ProcCC_FastCall = 5,
+ ProcCC_CDecl = 3,
+ ProcCC_StdCall = 4,
+ ProcCC_FastCall = 5,
- ProcCC_None = 6,
- ProcCC_Naked = 7,
+ ProcCC_None = 6,
+ ProcCC_Naked = 7,
- ProcCC_InlineAsm = 8,
+ ProcCC_InlineAsm = 8,
ProcCC_MAX,
@@ -227,6 +227,10 @@ enum ProcCallingConvention {
ProcCC_ForeignBlockDefault = -1,
};
+ProcCallingConvention default_calling_convention(void) {
+ return ProcCC_Odin;
+}
+
enum StateFlag : u16 {
StateFlag_bounds_check = 1<<0,
StateFlag_no_bounds_check = 1<<1,