diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2022-06-13 14:10:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-13 08:10:40 +0200 |
commit | 2f4900615ab0c42c9608910dd30a14be52455f91 (patch) | |
tree | d9e7c8357ee3b3223ac337ee987253df16d5dfe2 /compiler | |
parent | 8fa2c0b532be9fdfd7682e5a8cc846b60bd4ea6c (diff) | |
download | Nim-2f4900615ab0c42c9608910dd30a14be52455f91.tar.gz |
[cleanup] remove unnecessary procs in vm (#19888)
remove unused procs
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/vm.nim | 1 | ||||
-rw-r--r-- | compiler/vmgen.nim | 7 |
2 files changed, 2 insertions, 6 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim index bbcff77ba..1b11cb4f3 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -2252,7 +2252,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) diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index dadcc3865..2e7f6d8b0 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -439,14 +439,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 = @@ -1857,7 +1854,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 |