Deprecate when declared(echo):echo (#13840)
This commit is contained in:
parent
9102ac8c7d
commit
afd0afe0a3
4 changed files with 79 additions and 81 deletions
|
|
@ -24,7 +24,7 @@ proc typeToYaml*(conf: ConfigRef; n: PType, indent: int = 0, maxRecDepth: int =
|
||||||
proc symToYaml*(conf: ConfigRef; n: PSym, indent: int = 0, maxRecDepth: int = - 1): Rope
|
proc symToYaml*(conf: ConfigRef; n: PSym, indent: int = 0, maxRecDepth: int = - 1): Rope
|
||||||
proc lineInfoToStr*(conf: ConfigRef; info: TLineInfo): Rope
|
proc lineInfoToStr*(conf: ConfigRef; info: TLineInfo): Rope
|
||||||
|
|
||||||
when declared(echo):
|
|
||||||
# these are for debugging only: They are not really deprecated, but I want
|
# these are for debugging only: They are not really deprecated, but I want
|
||||||
# the warning so that release versions do not contain debugging statements:
|
# the warning so that release versions do not contain debugging statements:
|
||||||
proc debug*(n: PSym; conf: ConfigRef = nil) {.exportc: "debugSym", deprecated.}
|
proc debug*(n: PSym; conf: ConfigRef = nil) {.exportc: "debugSym", deprecated.}
|
||||||
|
|
@ -628,7 +628,7 @@ proc value(this: var DebugPrinter; value: PNode) =
|
||||||
|
|
||||||
this.closeCurly
|
this.closeCurly
|
||||||
|
|
||||||
when declared(echo):
|
|
||||||
proc debug(n: PSym; conf: ConfigRef) =
|
proc debug(n: PSym; conf: ConfigRef) =
|
||||||
var this: DebugPrinter
|
var this: DebugPrinter
|
||||||
this.visited = initTable[pointer, int]()
|
this.visited = initTable[pointer, int]()
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,6 @@ proc echoCfg*(c: ControlFlowGraph; start=0; last = -1) {.deprecated.} =
|
||||||
## echos the ControlFlowGraph for debugging purposes.
|
## echos the ControlFlowGraph for debugging purposes.
|
||||||
var buf = ""
|
var buf = ""
|
||||||
codeListing(c, buf, start, last)
|
codeListing(c, buf, start, last)
|
||||||
when declared(echo):
|
|
||||||
echo buf
|
echo buf
|
||||||
|
|
||||||
proc forkI(c: var Con; n: PNode): TPosition =
|
proc forkI(c: var Con; n: PNode): TPosition =
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,6 @@ proc searchInScopes*(c: PContext, s: PIdent): PSym =
|
||||||
if result != nil: return
|
if result != nil: return
|
||||||
result = nil
|
result = nil
|
||||||
|
|
||||||
when declared(echo):
|
|
||||||
proc debugScopes*(c: PContext; limit=0) {.deprecated.} =
|
proc debugScopes*(c: PContext; limit=0) {.deprecated.} =
|
||||||
var i = 0
|
var i = 0
|
||||||
for scope in walkScopes(c.currentScope):
|
for scope in walkScopes(c.currentScope):
|
||||||
|
|
|
||||||
|
|
@ -892,7 +892,7 @@ elif not defined(useNimRtl):
|
||||||
|
|
||||||
# Parent process. Copy process information.
|
# Parent process. Copy process information.
|
||||||
if poEchoCmd in options:
|
if poEchoCmd in options:
|
||||||
when declared(echo): echo(command, " ", join(args, " "))
|
echo(command, " ", join(args, " "))
|
||||||
result.id = pid
|
result.id = pid
|
||||||
result.exitFlag = false
|
result.exitFlag = false
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue