summary refs log tree commit diff stats
path: root/compiler/ast.nim
diff options
context:
space:
mode:
authorHuy Doan <106477+ba0f3@users.noreply.github.com>2020-05-27 21:24:47 +0700
committerGitHub <noreply@github.com>2020-05-27 16:24:47 +0200
commit00fa7a57476ed6fe81fb2d9171ba902fad9b83d5 (patch)
treead0e3d12e7179d182839bc2d8c5fa999c7f2db9b /compiler/ast.nim
parentcc65ae6011eeb7f85726e6eebfc8dee922ad3451 (diff)
downloadNim-00fa7a57476ed6fe81fb2d9171ba902fad9b83d5.tar.gz
Add thiscall calling convention, mostly for hooking purpose (#14466)
* Add thiscall calling convention, mostly for hooking purpose
* add changelog and documentation
Diffstat (limited to 'compiler/ast.nim')
-rw-r--r--compiler/ast.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 3fe75d1f3..97aa3a992 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -25,12 +25,13 @@ type
     ccInline,                 # proc should be inlined
     ccNoInline,               # proc should not be inlined
     ccFastCall,               # fastcall (pass parameters in registers)
+    ccThisCall,               # thiscall (parameters are pushed right-to-left)
     ccClosure,                # proc has a closure
     ccNoConvention            # needed for generating proper C procs sometimes
 
 const
   CallingConvToStr*: array[TCallingConvention, string] = ["", "stdcall",
-    "cdecl", "safecall", "syscall", "inline", "noinline", "fastcall",
+    "cdecl", "safecall", "syscall", "inline", "noinline", "fastcall", "thiscall",
     "closure", "noconv"]
 
 type