mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
[cleanup] remove unnecessary procs in vm (#19888)
remove unused procs
(cherry picked from commit 2f4900615a)
This commit is contained in:
@@ -2280,7 +2280,6 @@ proc setupMacroParam(x: PNode, typ: PType): TFullReg =
|
||||
else:
|
||||
var n = x
|
||||
if n.kind in {nkHiddenSubConv, nkHiddenStdConv}: n = n[1]
|
||||
n = n.canonValue
|
||||
n.flags.incl nfIsRef
|
||||
n.typ = x.typ
|
||||
result = TFullReg(kind: rkNode, node: n)
|
||||
|
||||
@@ -441,14 +441,11 @@ proc genAndOr(c: PCtx; n: PNode; opc: TOpcode; dest: var TDest) =
|
||||
c.gABC(n, opcAsgnInt, dest, tmp)
|
||||
freeTemp(c, tmp)
|
||||
|
||||
proc canonValue*(n: PNode): PNode =
|
||||
result = n
|
||||
|
||||
proc rawGenLiteral(c: PCtx; n: PNode): int =
|
||||
result = c.constants.len
|
||||
#assert(n.kind != nkCall)
|
||||
n.flags.incl nfAllConst
|
||||
c.constants.add n.canonValue
|
||||
c.constants.add n
|
||||
internalAssert c.config, result < regBxMax
|
||||
|
||||
proc sameConstant*(a, b: PNode): bool =
|
||||
@@ -1872,7 +1869,7 @@ proc genVarSection(c: PCtx; n: PNode) =
|
||||
else:
|
||||
let sa = getNullValue(s.typ, a.info, c.config)
|
||||
#if s.ast.isNil: getNullValue(s.typ, a.info)
|
||||
#else: canonValue(s.ast)
|
||||
#else: s.ast
|
||||
assert sa.kind != nkCall
|
||||
c.globals.add(sa)
|
||||
s.position = c.globals.len
|
||||
|
||||
Reference in New Issue
Block a user