mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-18 15:01:24 +00:00
remove debug statements
This commit is contained in:
@@ -632,8 +632,8 @@ proc p(n: PNode; c: var Con): PNode =
|
||||
recurse(n, result)
|
||||
|
||||
proc injectDestructorCalls*(g: ModuleGraph; owner: PSym; n: PNode): PNode =
|
||||
#when true: # defined(nimDebugDestroys):
|
||||
# echo "injecting into ", n
|
||||
when false: # defined(nimDebugDestroys):
|
||||
echo "injecting into ", n
|
||||
var c: Con
|
||||
c.owner = owner
|
||||
c.topLevelVars = newNodeI(nkVarSection, n.info)
|
||||
@@ -667,10 +667,10 @@ proc injectDestructorCalls*(g: ModuleGraph; owner: PSym; n: PNode): PNode =
|
||||
else:
|
||||
result.add body
|
||||
|
||||
#when defined(nimDebugDestroys):
|
||||
if true:
|
||||
echo "------------------------------------"
|
||||
echo n
|
||||
echo "-------"
|
||||
echo owner.name.s, " transformed to: "
|
||||
echo result
|
||||
when defined(nimDebugDestroys):
|
||||
if true:
|
||||
echo "------------------------------------"
|
||||
echo n
|
||||
echo "-------"
|
||||
echo owner.name.s, " transformed to: "
|
||||
echo result
|
||||
|
||||
@@ -221,15 +221,10 @@ proc reset*[T](obj: var T) {.magic: "Reset", noSideEffect.}
|
||||
## be called before any possible `object branch transition`:idx:.
|
||||
|
||||
when defined(nimNewRuntime):
|
||||
proc wasMoved*[T](obj: var T) {.magic: "WasMoved", noSideEffect.} =
|
||||
## resets an object `obj` to its initial (binary zero) value to signify
|
||||
## it was "moved" and to signify its destructor should do nothing and
|
||||
## ideally be optimized away.
|
||||
discard
|
||||
|
||||
proc move*[T](x: var T): T {.magic: "Move", noSideEffect.} =
|
||||
result = x
|
||||
wasMoved(x)
|
||||
reset(x)
|
||||
|
||||
type
|
||||
range*{.magic: "Range".}[T] ## Generic type to construct range types.
|
||||
|
||||
Reference in New Issue
Block a user