From cc5140d8b6ea8ca65ec9b74348cf23aec09d6723 Mon Sep 17 00:00:00 2001 From: jcosborn Date: Wed, 14 Mar 2018 10:13:30 -0500 Subject: [PATCH] reuse default ident in opcNNewNimNode (performance regression) (#7330) * reuse default ident in opcNNewNimNode (performance regression) * use emptyIdent as default --- compiler/vm.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/vm.nim b/compiler/vm.nim index 23216f0a3a..6ea6f14924 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -1490,7 +1490,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = c.debug[pc]) x.flags.incl nfIsRef # prevent crashes in the compiler resulting from wrong macros: - if x.kind == nkIdent: x.ident = getIdent"" + if x.kind == nkIdent: x.ident = c.cache.emptyIdent regs[ra].node = x of opcNCopyNimNode: decodeB(rkNode)