* remove unnecessary when statement

* remove outdated codes

* reuse jsffi

* move js json coverage

* fix #17267

* address comments

* Update compiler/main.nim

* Update tests/threads/tjsthreads.nim
This commit is contained in:
flywind 2021-03-07 19:13:41 +08:00 • committed by GitHub
commit d1e093207a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -613,7 +613,9 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
of "hintaserror": processSpecificNote(arg, wHintAsError, pass, info, switch, conf) of "hintaserror": processSpecificNote(arg, wHintAsError, pass, info, switch, conf)
of "hints": of "hints":
if processOnOffSwitchOrList(conf, {optHints}, arg, pass, info): listHints(conf) if processOnOffSwitchOrList(conf, {optHints}, arg, pass, info): listHints(conf)
of "threadanalysis": processOnOffSwitchG(conf, {optThreadAnalysis}, arg, pass, info) of "threadanalysis":
if conf.backend == backendJs: discard
else: processOnOffSwitchG(conf, {optThreadAnalysis}, arg, pass, info)
of "stacktrace": processOnOffSwitch(conf, {optStackTrace}, arg, pass, info) of "stacktrace": processOnOffSwitch(conf, {optStackTrace}, arg, pass, info)
of "stacktracemsgs": processOnOffSwitch(conf, {optStackTraceMsgs}, arg, pass, info) of "stacktracemsgs": processOnOffSwitch(conf, {optStackTraceMsgs}, arg, pass, info)
of "excessivestacktrace": processOnOffSwitchG(conf, {optExcessiveStackTrace}, arg, pass, info) of "excessivestacktrace": processOnOffSwitchG(conf, {optExcessiveStackTrace}, arg, pass, info)
@ -670,7 +672,8 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
of "linedir": processOnOffSwitch(conf, {optLineDir}, arg, pass, info) of "linedir": processOnOffSwitch(conf, {optLineDir}, arg, pass, info)
of "assertions", "a": processOnOffSwitch(conf, {optAssert}, arg, pass, info) of "assertions", "a": processOnOffSwitch(conf, {optAssert}, arg, pass, info)
of "threads": of "threads":
processOnOffSwitchG(conf, {optThreads}, arg, pass, info) if conf.backend == backendJs: discard
else: processOnOffSwitchG(conf, {optThreads}, arg, pass, info)
#if optThreads in conf.globalOptions: conf.setNote(warnGcUnsafe) #if optThreads in conf.globalOptions: conf.setNote(warnGcUnsafe)
of "tlsemulation": processOnOffSwitchG(conf, {optTlsEmulation}, arg, pass, info) of "tlsemulation": processOnOffSwitchG(conf, {optTlsEmulation}, arg, pass, info)
of "implicitstatic": of "implicitstatic":

View file

@ -0,0 +1,6 @@
discard """
targets: "c cpp js"
matrix: "--threads"
"""
echo 123