Trim remaining expr/stmt from stdlib (#6742)
This commit is contained in:
parent
7f4248dc0c
commit
0ab373115c
9 changed files with 16 additions and 16 deletions
|
|
@ -370,7 +370,7 @@ proc commandPrompt() =
|
|||
if dbgUser.len == 0: dbgUser.len = oldLen
|
||||
# now look what we have to do:
|
||||
var i = scanWord(addr dbgUser.data, dbgTemp, 0)
|
||||
template `?`(x: expr): expr = dbgTemp == cstring(x)
|
||||
template `?`(x: untyped): untyped = dbgTemp == cstring(x)
|
||||
if ?"s" or ?"step":
|
||||
dbgState = dbStepInto
|
||||
again = false
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ proc internRefcount(p: pointer): int {.exportc: "getRefcount".} =
|
|||
when BitsPerPage mod (sizeof(int)*8) != 0:
|
||||
{.error: "(BitsPerPage mod BitsPerUnit) should be zero!".}
|
||||
|
||||
template color(c): expr = c.refCount and colorMask
|
||||
template color(c): untyped = c.refCount and colorMask
|
||||
template setColor(c, col) =
|
||||
c.refcount = c.refcount and not colorMask or col
|
||||
|
||||
|
|
|
|||
|
|
@ -153,12 +153,12 @@ proc preferSpawn*(): bool =
|
|||
## it is not necessary to call this directly; use 'spawnX' instead.
|
||||
result = gSomeReady.event
|
||||
|
||||
proc spawn*(call: stmt) {.magic: "Spawn".}
|
||||
proc spawn*(call: typed) {.magic: "Spawn".}
|
||||
## always spawns a new task, so that the 'call' is never executed on
|
||||
## the calling thread. 'call' has to be proc call 'p(...)' where 'p'
|
||||
## is gcsafe and has 'void' as the return type.
|
||||
|
||||
template spawnX*(call: stmt) =
|
||||
template spawnX*(call: typed) =
|
||||
## spawns a new task if a CPU core is ready, otherwise executes the
|
||||
## call in the calling thread. Usually it is advised to
|
||||
## use 'spawn' in order to not block the producer for an unknown
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue