the new feature's name is hotCodeReloading

This commit is contained in:
Andreas Rumpf 2018-04-13 23:48:56 +02:00
commit 9e884c31dd
6 changed files with 14 additions and 13 deletions

View file

@ -473,10 +473,10 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
processOnOffSwitch({optMemTracker}, arg, pass, info)
if optMemTracker in gOptions: defineSymbol("memtracker")
else: undefSymbol("memtracker")
of "hotreloading":
processOnOffSwitch({optHotReloading}, arg, pass, info)
if optHotReloading in gOptions: defineSymbol("hotreloading")
else: undefSymbol("hotreloading")
of "hotcodereloading":
processOnOffSwitch({optHotCodeReloading}, arg, pass, info)
if optHotCodeReloading in gOptions: defineSymbol("hotcodereloading")
else: undefSymbol("hotcodereloading")
of "oldnewlines":
case arg.normalize
of "on":

View file

@ -255,7 +255,7 @@ proc mangleName(m: BModule, s: PSym): Rope =
inc i
result = rope(x)
if s.name.s != "this" and s.kind != skField:
if optHotReloading in gOptions:
if optHotCodeReloading in gOptions:
# When hot reloading is enabled, we must ensure that the names
# of functions and types will be preserved across rebuilds:
add(result, idOrSig(s, m.module.name.s, m.sigConflicts))
@ -1584,7 +1584,7 @@ proc genVarInit(p: PProc, v: PSym, n: PNode) =
s: Rope
varCode: string
varName = mangleName(p.module, v)
useReloadingGuard = sfGlobal in v.flags and optHotReloading in gOptions
useReloadingGuard = sfGlobal in v.flags and optHotCodeReloading in gOptions
if v.constraint.isNil:
if useReloadingGuard:
@ -2208,7 +2208,7 @@ proc genProc(oldProc: PProc, prc: PSym): Rope =
else:
result = ~tnl
if optHotReloading in gOptions:
if optHotCodeReloading in gOptions:
# Here, we introduce thunks that create the equivalent of a jump table
# for all global functions, because references to them may be stored
# in JavaScript variables. The added indirection ensures that such

View file

@ -37,7 +37,7 @@ type # please make sure we have under 32 options
# evaluation
optPatterns, # en/disable pattern matching
optMemTracker,
optHotReloading
optHotCodeReloading
TOptions* = set[TOption]
TGlobalOption* = enum # **keep binary compatible**