From 26b7a74a45059453b42f8eee4ccf0586b9003087 Mon Sep 17 00:00:00 2001 From: Amjad Ben Hedhili Date: Mon, 13 Mar 2023 17:32:20 +0100 Subject: [PATCH] Optimize `cgen.addIndent` (#21508) * Optimize `cgen.addIndent` * Avoid temporaries --- compiler/cgen.nim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/cgen.nim b/compiler/cgen.nim index d2095016c3..5ba68580da 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -228,8 +228,12 @@ macro ropecg(m: BModule, frmt: static[FormatStr], args: untyped): Rope = result.add newCall(ident"rope", resVar) proc addIndent(p: BProc; result: var Rope) = - for i in 0..