diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-12-09 12:59:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-09 12:59:28 +0100 |
commit | 9cafa5ac5828e823c13d54e45aa18281482b374a (patch) | |
tree | cb6a5a6571fe746555d28105a5b1329b5505c580 /compiler/ccgcalls.nim | |
parent | c16963083d828b7920c221a5031b509c9824db4a (diff) | |
parent | a65141fc0b85ac5f1b62469aeefb2389b1d67ae5 (diff) | |
download | Nim-9cafa5ac5828e823c13d54e45aa18281482b374a.tar.gz |
Merge pull request #9902 from arnetheduck/daily-clean
daily cruft removal
Diffstat (limited to 'compiler/ccgcalls.nim')
-rw-r--r-- | compiler/ccgcalls.nim | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/compiler/ccgcalls.nim b/compiler/ccgcalls.nim index b23cd598e..d177e1f88 100644 --- a/compiler/ccgcalls.nim +++ b/compiler/ccgcalls.nim @@ -63,26 +63,6 @@ proc fixupCall(p: BProc, le, ri: PNode, d: var TLoc, add(pl, ~");$n") line(p, cpsStmts, pl) -proc isInCurrentFrame(p: BProc, n: PNode): bool = - # checks if `n` is an expression that refers to the current frame; - # this does not work reliably because of forwarding + inlining can break it - case n.kind - of nkSym: - if n.sym.kind in {skVar, skResult, skTemp, skLet} and p.prc != nil: - result = p.prc.id == n.sym.owner.id - of nkDotExpr, nkBracketExpr: - if skipTypes(n.sons[0].typ, abstractInst).kind notin {tyVar,tyLent,tyPtr,tyRef}: - result = isInCurrentFrame(p, n.sons[0]) - of nkHiddenStdConv, nkHiddenSubConv, nkConv: - result = isInCurrentFrame(p, n.sons[1]) - of nkHiddenDeref, nkDerefExpr: - # what about: var x = addr(y); callAsOpenArray(x[])? - # *shrug* ``addr`` is unsafe anyway. - result = false - of nkObjUpConv, nkObjDownConv, nkCheckedFieldExpr: - result = isInCurrentFrame(p, n.sons[0]) - else: discard - proc genBoundsCheck(p: BProc; arr, a, b: TLoc) proc openArrayLoc(p: BProc, n: PNode): Rope = |