minor cleanups (#17948)
This commit is contained in:
parent
436af88d8c
commit
98cd1671a3
3 changed files with 1 additions and 5 deletions
|
|
@ -36,8 +36,6 @@ type
|
||||||
selfSym*: PSym # the 'self' symbol (if available)
|
selfSym*: PSym # the 'self' symbol (if available)
|
||||||
nestedLoopCounter*: int # whether we are in a loop or not
|
nestedLoopCounter*: int # whether we are in a loop or not
|
||||||
nestedBlockCounter*: int # whether we are in a block or not
|
nestedBlockCounter*: int # whether we are in a block or not
|
||||||
inTryStmt*: int # whether we are in a try statement; works also
|
|
||||||
# in standalone ``except`` and ``finally``
|
|
||||||
next*: PProcCon # used for stacking procedure contexts
|
next*: PProcCon # used for stacking procedure contexts
|
||||||
mappingExists*: bool
|
mappingExists*: bool
|
||||||
mapping*: TIdTable
|
mapping*: TIdTable
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,6 @@ proc semTry(c: PContext, n: PNode; flags: TExprFlags): PNode =
|
||||||
isImported
|
isImported
|
||||||
|
|
||||||
result = n
|
result = n
|
||||||
inc c.p.inTryStmt
|
|
||||||
checkMinSonsLen(n, 2, c.config)
|
checkMinSonsLen(n, 2, c.config)
|
||||||
|
|
||||||
var typ = commonTypeBegin
|
var typ = commonTypeBegin
|
||||||
|
|
@ -265,7 +264,6 @@ proc semTry(c: PContext, n: PNode; flags: TExprFlags): PNode =
|
||||||
else: dec last
|
else: dec last
|
||||||
closeScope(c)
|
closeScope(c)
|
||||||
|
|
||||||
dec c.p.inTryStmt
|
|
||||||
if isEmptyType(typ) or typ.kind in {tyNil, tyUntyped}:
|
if isEmptyType(typ) or typ.kind in {tyNil, tyUntyped}:
|
||||||
discardCheck(c, n[0], flags)
|
discardCheck(c, n[0], flags)
|
||||||
for i in 1..<n.len: discardCheck(c, n[i].lastSon, flags)
|
for i in 1..<n.len: discardCheck(c, n[i].lastSon, flags)
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,7 @@ iterator elements(t: IntSet): int {.inline.} =
|
||||||
r = r.next
|
r = r.next
|
||||||
|
|
||||||
proc isSmallChunk(c: PChunk): bool {.inline.} =
|
proc isSmallChunk(c: PChunk): bool {.inline.} =
|
||||||
return c.size <= SmallChunkSize-smallChunkOverhead()
|
result = c.size <= SmallChunkSize-smallChunkOverhead()
|
||||||
|
|
||||||
proc chunkUnused(c: PChunk): bool {.inline.} =
|
proc chunkUnused(c: PChunk): bool {.inline.} =
|
||||||
result = (c.prevSize and 1) == 0
|
result = (c.prevSize and 1) == 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue