From 9599d95caa66909f2de10cb5f3b0aeccfc366d0e Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 3 Oct 2020 17:34:42 +0200 Subject: [PATCH] fixes https://github.com/nim-lang/RFCs/issues/257 [backport:1.2] (#15479) (cherry picked from commit 2288188fe9a9d854a167dd270eb8d72d19676865) --- compiler/transf.nim | 7 ------- compiler/trees.nim | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/transf.nim b/compiler/transf.nim index 5cd19868f6..1c0efc70ac 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -830,13 +830,6 @@ proc transformExceptBranch(c: PTransf, n: PNode): PNode = else: result = transformSons(c, n) -proc dontInlineConstant(orig, cnst: PNode): bool {.inline.} = - # symbols that expand to a complex constant (array, etc.) should not be - # inlined, unless it's the empty array: - result = orig.kind == nkSym and - cnst.kind in {nkCurly, nkPar, nkTupleConstr, nkBracket} and - cnst.len != 0 - proc commonOptimizations*(g: ModuleGraph; c: PSym, n: PNode): PNode = result = n for i in 0.. ord(cnst.kind == nkObjConstr)