hotfix: make 'nim doc nimhcr' work on all platforms

This commit is contained in:
Araq 2020-03-23 13:05:29 +01:00
commit e05fd1d00f

View file

@ -228,7 +228,7 @@ when defined(createNimHcr):
{.pragma: nimhcr, compilerProc, exportc, dynlib.}
when hostCPU in ["i386", "amd64"]:
# XXX these types are CPU specific and need ARM etc support
type
ShortJumpInstruction {.packed.} = object
opcode: byte
@ -260,7 +260,7 @@ when defined(createNimHcr):
jumpTableEntry.offset = 0
jumpTableEntry.absoluteAddr = targetFn
elif hostCPU == "arm":
if hostCPU == "arm":
const jumpSize = 8
elif hostCPU == "arm64":
const jumpSize = 16
@ -556,7 +556,7 @@ when defined(createNimHcr):
inc(generation)
trace "HCR RELOADING: ", generation
var traversedHandlerModules = initSet[string]()
var traversedHandlerModules = initHashSet[string]()
proc recursiveExecuteHandlers(isBefore: bool, module: string) =
# do not process an already traversed module