From 3892088086a10dec9499937a5d948f38b72ecde4 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Wed, 4 Mar 2020 07:30:00 -0800 Subject: [PATCH] use --stacktrace:on,off,noinline to preserve default behavior --- compiler/cgen.nim | 2 +- compiler/commands.nim | 6 +++--- compiler/options.nim | 2 +- doc/basicopt.txt | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 8e7299c6e0152..b276a085b6af8 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -29,7 +29,7 @@ import dynlib template isGnerateNimFrame(options, sym): bool = optStackTrace in options and - (optStackTraceInline in options or sym.typ.callConv != ccInline) + (optStackTraceNoInline notin options or sym.typ.callConv != ccInline) when not declared(dynlib.libCandidates): proc libCandidates(s: string, dest: var seq[string]) = diff --git a/compiler/commands.nim b/compiler/commands.nim index bb014a5ea6635..2fe25b5214848 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -281,7 +281,7 @@ proc testCompileOption*(conf: ConfigRef; switch: string, info: TLineInfo): bool of "hints": result = contains(conf.options, optHints) of "threadanalysis": result = contains(conf.globalOptions, optThreadAnalysis) of "stacktrace": result = contains(conf.options, optStackTrace) - of "stacktraceInline": result = contains(conf.options, optStackTraceInline) + of "stacktraceNoInline": result = contains(conf.options, optStackTraceNoInline) of "linetrace": result = contains(conf.options, optLineTrace) of "debugger": result = contains(conf.globalOptions, optCDebug) of "profiler": result = contains(conf.options, optProfiler) @@ -534,8 +534,8 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; case arg.normalize of "","on": conf.options.incl optStackTrace of "off": conf.options.excl optStackTrace - of "inline": conf.options.incl {optStackTrace, optStackTraceInline} - else: localError(conf, info, errExpectedButFound % ["'', 'on', 'off', 'inline'", arg]) + of "noinline": conf.options.incl {optStackTrace, optStackTraceNoInline} + else: localError(conf, info, errExpectedButFound % ["'', 'on', 'off', 'noinline'", arg]) of "excessivestacktrace": processOnOffSwitchG(conf, {optExcessiveStackTrace}, arg, pass, info) of "linetrace": processOnOffSwitch(conf, {optLineTrace}, arg, pass, info) of "debugger": diff --git a/compiler/options.nim b/compiler/options.nim index 83494703a15c4..07af92ef79f16 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -28,7 +28,7 @@ type # please make sure we have under 32 options optOverflowCheck, optNilCheck, optRefCheck, optNaNCheck, optInfCheck, optStyleCheck, optAssert, optLineDir, optWarns, optHints, - optOptimizeSpeed, optOptimizeSize, optStackTrace, optStackTraceInline, # stack tracing support + optOptimizeSpeed, optOptimizeSize, optStackTrace, optStackTraceNoInline, # stack tracing support optLineTrace, # line tracing support (includes stack tracing) optByRef, # use pass by ref for objects # (for interfacing with C) diff --git a/doc/basicopt.txt b/doc/basicopt.txt index 98e57d90ea484..1f3fb8ab3a0a6 100644 --- a/doc/basicopt.txt +++ b/doc/basicopt.txt @@ -17,8 +17,8 @@ Options: see: "compile time define pragmas") -u, --undef:SYMBOL undefine a conditional symbol -f, --forceBuild:on|off force rebuilding of all modules - --stackTrace:on|off|inline turn stack tracing on|off; {.inline.} procs - won't be traceable unless `inline` is used + --stackTrace:on|off|noinline turn stack tracing on|off; {.inline.} procs + won't be traceable with `noinline` option --lineTrace:on|off turn line tracing on|off --threads:on|off turn support for multi-threading on|off -x, --checks:on|off turn all runtime checks on|off