preparations for making 'closure' the default calling convention for proc types
This commit is contained in:
parent
56b4e3ad91
commit
8d99753d63
36 changed files with 117 additions and 102 deletions
|
|
@ -45,7 +45,7 @@ type
|
|||
TWalkOp = enum
|
||||
waZctDecRef, waPush, waCycleDecRef
|
||||
|
||||
TFinalizer {.compilerproc.} = proc (self: pointer)
|
||||
TFinalizer {.compilerproc.} = proc (self: pointer) {.nimcall.}
|
||||
# A ref type can have a finalizer that is called before the object's
|
||||
# storage is freed.
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ type # This should be he same as ast.TTypeKind
|
|||
base: ptr TNimType
|
||||
node: ptr TNimNode # valid for tyRecord, tyObject, tyTuple, tyEnum
|
||||
finalizer: pointer # the finalizer for the type
|
||||
marker: proc (p: pointer, op: int) # marker proc for GC
|
||||
marker: proc (p: pointer, op: int) {.nimcall.} # marker proc for GC
|
||||
PNimType = ptr TNimType
|
||||
|
||||
# node.len may be the ``first`` element of a set
|
||||
|
|
|
|||
|
|
@ -255,9 +255,9 @@ type
|
|||
## that **must not** be part of a message! Use
|
||||
## a ``TThreadId`` for that.
|
||||
when TArg is void:
|
||||
dataFn: proc ()
|
||||
dataFn: proc () {.nimcall.}
|
||||
else:
|
||||
dataFn: proc (m: TArg)
|
||||
dataFn: proc (m: TArg) {.nimcall.}
|
||||
data: TArg
|
||||
TThreadId*[TArg] = ptr TThread[TArg] ## the current implementation uses
|
||||
## a pointer as a thread ID.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue