more checking for --gc:arc, no need for valgrind (#14467)
* sigmatch: removed dead code
This commit is contained in:
parent
4c08e64e98
commit
e31ac81899
12 changed files with 159 additions and 73 deletions
|
|
@ -2067,7 +2067,8 @@ proc myClose(graph: ModuleGraph; b: PPassContext, n: PNode): PNode =
|
|||
let disp = generateMethodDispatchers(graph)
|
||||
for x in disp: genProcAux(m, x.sym)
|
||||
|
||||
m.g.modulesClosed.add m
|
||||
let mm = m
|
||||
m.g.modulesClosed.add mm
|
||||
|
||||
proc genForwardedProcs(g: BModuleList) =
|
||||
# Forward declared proc:s lack bodies when first encountered, so they're given
|
||||
|
|
|
|||
|
|
@ -809,4 +809,7 @@ proc constructCfg*(s: PSym; body: PNode): ControlFlowGraph =
|
|||
withBlock(s):
|
||||
gen(c, body)
|
||||
genImplicitReturn(c)
|
||||
shallowCopy(result, c.code)
|
||||
when defined(gcArc) or defined(gcOrc):
|
||||
result = c.code # will move
|
||||
else:
|
||||
shallowCopy(result, c.code)
|
||||
|
|
|
|||
|
|
@ -354,6 +354,8 @@ proc genWasMoved(n: PNode; c: var Con): PNode =
|
|||
result = newNodeI(nkCall, n.info)
|
||||
result.add(newSymNode(createMagic(c.graph, "wasMoved", mWasMoved)))
|
||||
result.add copyTree(n) #mWasMoved does not take the address
|
||||
#if n.kind != nkSym:
|
||||
# message(c.graph.config, n.info, warnUser, "wasMoved(" & $n & ")")
|
||||
|
||||
proc genDefaultCall(t: PType; c: Con; info: TLineInfo): PNode =
|
||||
result = newNodeI(nkCall, info)
|
||||
|
|
|
|||
|
|
@ -993,6 +993,11 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
|
|||
result = isNone
|
||||
assert(f != nil)
|
||||
|
||||
when declared(deallocatedRefId):
|
||||
let corrupt = deallocatedRefId(cast[pointer](f))
|
||||
if corrupt != 0:
|
||||
quit "it's corrupt " & $corrupt
|
||||
|
||||
if f.kind == tyUntyped:
|
||||
if aOrig != nil: put(c, f, aOrig)
|
||||
return isGeneric
|
||||
|
|
@ -1409,7 +1414,6 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
|
|||
let roota = a.skipGenericAlias
|
||||
let rootf = f.skipGenericAlias
|
||||
|
||||
var m = c
|
||||
if a.kind == tyGenericInst:
|
||||
if roota.base == rootf.base:
|
||||
let nextFlags = flags + {trNoCovariance}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue