Use typeflag instead

This commit is contained in:
Clyybber 2020-08-10 12:57:32 +02:00
commit b022576ce9
11 changed files with 29 additions and 18 deletions

View file

@ -17,8 +17,7 @@ export int128
type
TCallingConvention* = enum
ccImplicit, # proc has no explicit calling convention
ccNimCall, # proc was explicitly marked as nimcall
ccNimCall, # nimcall, also the default
ccStdCall, # procedure is stdcall
ccCDecl, # cdecl
ccSafeCall, # safecall
@ -31,12 +30,10 @@ type
ccNoConvention # needed for generating proper C procs sometimes
const
ccDefault* = {ccImplicit, ccNimCall}
CallingConvToStr*: array[TCallingConvention, string] = ["", "nimcall", "stdcall",
CallingConvToStr*: array[TCallingConvention, string] = ["nimcall", "stdcall",
"cdecl", "safecall", "syscall", "inline", "noinline", "fastcall", "thiscall",
"closure", "noconv"]
type
TNodeKind* = enum # order is extremely important, because ranges are used
# to check whether a node belongs to a certain class
@ -563,6 +560,7 @@ type
tfCompleteStruct
# (for importc types); type is fully specified, allowing to compute
# sizeof, alignof, offsetof at CT
tfExplicitCallConv
TTypeFlags* = set[TTypeFlag]