From bdf00cf6b089eccd30b5cfec8c06be7b949749d8 Mon Sep 17 00:00:00 2001 From: fche Date: Mon, 28 Nov 2005 21:58:39 +0000 Subject: 2005-11-28 Frank Ch. Eigler * translate.cxx (c_tmpcounter_assignment::visit_symbol): Don't emit unused temporary into context. Saves mucho space with strings. --- translate.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'translate.cxx') diff --git a/translate.cxx b/translate.cxx index e47f2856..2035477e 100644 --- a/translate.cxx +++ b/translate.cxx @@ -2383,7 +2383,9 @@ c_tmpcounter_assignment::visit_symbol (symbol *e) tmpvar res = parent->parent->gensym (ty); tmp.declare (*(parent->parent)); - res.declare (*(parent->parent)); + + if (op != "=") // simple assignment is shortcut both for strings and numbers + res.declare (*(parent->parent)); if (rvalue) rvalue->visit (parent); -- cgit