diff options
author | Jacek Sieka <arnetheduck@gmail.com> | 2018-11-26 02:47:39 -0600 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-11-26 09:47:39 +0100 |
commit | 87568830abe25a09d7c0947fbefa1d80b19868bd (patch) | |
tree | 92aa875f32c00c7458fe3635be7e0a8aeb43e034 /compiler | |
parent | ea5fc9f2040715788449e9031607eab0a1a4d8e7 (diff) | |
download | Nim-87568830abe25a09d7c0947fbefa1d80b19868bd.tar.gz |
Remove dead code (#9777)
* gc/gc2: remove unused ref counting stuff * also removes some false threading support - hasSharedHeap is always false in gc/gc2 * gc: remove some threading cruft * remove asgnRefNoCycle * compiler: remove TLoc.dup (unused)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/ast.nim | 1 | ||||
-rw-r--r-- | compiler/ccgexprs.nim | 9 |
2 files changed, 2 insertions, 8 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim index 6a73df3c7..e509d2ceb 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -768,7 +768,6 @@ type flags*: TLocFlags # location's flags lode*: PNode # Node where the location came from; can be faked r*: Rope # rope value of location (code generators) - dup*: Rope # duplicated location for precise stack scans # ---------------- end of backend information ------------------------------ diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index 388ab806e..40a5d674c 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -172,13 +172,8 @@ proc genRefAssign(p: BProc, dest, src: TLoc, flags: TAssignmentFlags) = if (dest.storage == OnStack and p.config.selectedGC != gcGo) or not usesWriteBarrier(p.config): linefmt(p, cpsStmts, "$1 = $2;$n", rdLoc(dest), rdLoc(src)) elif dest.storage == OnHeap: - # location is on heap - if canFormAcycle(dest.t): - linefmt(p, cpsStmts, "#asgnRef((void**) $1, $2);$n", - addrLoc(p.config, dest), rdLoc(src)) - else: - linefmt(p, cpsStmts, "#asgnRefNoCycle((void**) $1, $2);$n", - addrLoc(p.config, dest), rdLoc(src)) + linefmt(p, cpsStmts, "#asgnRef((void**) $1, $2);$n", + addrLoc(p.config, dest), rdLoc(src)) else: linefmt(p, cpsStmts, "#unsureAsgnRef((void**) $1, $2);$n", addrLoc(p.config, dest), rdLoc(src)) |