diff options
author | Viktor Kirilov <vik.kirilov@gmail.com> | 2019-08-23 23:50:34 +0300 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-08-23 22:50:34 +0200 |
commit | f2e8c39e851b1d1f55d387d80ae3d9f598a6ef0e (patch) | |
tree | 48db5af994ecba64ac6c58441d9bc898727d6f37 /compiler/ccgcalls.nim | |
parent | 547fcd69c3a689b7db8dc3e462659b71f791ab46 (diff) | |
download | Nim-f2e8c39e851b1d1f55d387d80ae3d9f598a6ef0e.tar.gz |
- adding _actual as a suffix only for calls to an actual proc and not through a global function pointer - fixes https://github.com/nim-lang/Nim/issues/11996 (#12007)
- adding forward declarations for reloadable functions within a module - fix compilation errors when 2 such functions reference each other - fixes https://github.com/nim-lang/Nim/issues/11608 - preserve permissions of copied executable binaries
Diffstat (limited to 'compiler/ccgcalls.nim')
-rw-r--r-- | compiler/ccgcalls.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/ccgcalls.nim b/compiler/ccgcalls.nim index 9201af466..2ae56863b 100644 --- a/compiler/ccgcalls.nim +++ b/compiler/ccgcalls.nim @@ -184,8 +184,8 @@ template genParamLoop(params) {.dirty.} = if params != nil: add(params, ~", ") add(params, genArgNoParam(p, ri.sons[i])) -proc addActualPrefixForHCR(res: var Rope, module: PSym, sym: PSym) = - if sym.flags * {sfImportc, sfNonReloadable} == {} and +proc addActualSuffixForHCR(res: var Rope, module: PSym, sym: PSym) = + if sym.flags * {sfImportc, sfNonReloadable} == {} and sym.loc.k == locProc and (sym.typ.callConv == ccInline or sym.owner.id == module.id): res = res & "_actual".rope @@ -203,7 +203,7 @@ proc genPrefixCall(p: BProc, le, ri: PNode, d: var TLoc) = genParamLoop(params) var callee = rdLoc(op) if p.hcrOn and ri.sons[0].kind == nkSym: - callee.addActualPrefixForHCR(p.module.module, ri.sons[0].sym) + callee.addActualSuffixForHCR(p.module.module, ri.sons[0].sym) fixupCall(p, le, ri, d, callee, params) proc genClosureCall(p: BProc, le, ri: PNode, d: var TLoc) = |