nim doc --backend:js, nim doc --doccmd:-d:foo, nim r --backend:js, --doccmd:skip + other improvements (#14278)
* `nim doc --backend:js|cpp...` `nim doc --doccmd:'-d:foo --threads:on'` `nim r --backend:cpp...` (implies --run --usenimcache) * --usenimcache works with all targets * --docCmd:skip now skips compiling snippets; 50X speedup for doc/manual.rst
This commit is contained in:
parent
d11cb9d495
commit
9502e39b63
22 changed files with 213 additions and 99 deletions
|
|
@ -121,6 +121,7 @@ when defined(nimHasInvariant):
|
|||
of linkOptions: result = conf.linkOptions
|
||||
of compileOptions: result = conf.compileOptions
|
||||
of ccompilerPath: result = conf.cCompilerPath
|
||||
of backend: result = $conf.backend
|
||||
|
||||
proc querySettingSeqImpl(conf: ConfigRef, switch: BiggestInt): seq[string] =
|
||||
template copySeq(field: untyped): untyped =
|
||||
|
|
@ -215,7 +216,7 @@ proc registerAdditionalOps*(c: PCtx) =
|
|||
|
||||
proc hashVmImpl(a: VmArgs) =
|
||||
var res = hashes.hash(a.getString(0), a.getInt(1).int, a.getInt(2).int)
|
||||
if c.config.cmd == cmdCompileToJS:
|
||||
if c.config.backend == backendJs:
|
||||
# emulate JS's terrible integers:
|
||||
res = cast[int32](res)
|
||||
setResult(a, res)
|
||||
|
|
@ -232,7 +233,7 @@ proc registerAdditionalOps*(c: PCtx) =
|
|||
bytes[i] = byte(arr[i].intVal and 0xff)
|
||||
|
||||
var res = hashes.hash(bytes, sPos, ePos)
|
||||
if c.config.cmd == cmdCompileToJS:
|
||||
if c.config.backend == backendJs:
|
||||
# emulate JS's terrible integers:
|
||||
res = cast[int32](res)
|
||||
setResult(a, res)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue