From 600d59db733b266a706bf74c4f2083cf7940e471 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 11 Mar 1998 09:27:52 +0000 Subject: speed-up patch 3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/parse.y b/parse.y index e3c3b799c8..e82fdfc553 100644 --- a/parse.y +++ b/parse.y @@ -3743,6 +3743,10 @@ local_pop() static ID* local_tbl() { +#if 1 + local_cnt('_'); + local_cnt('~'); +#endif lvtbl->nofree = 1; return lvtbl->tbl; } @@ -3832,17 +3836,11 @@ top_local_setup() the_scope->local_vars = vars+1; memclear(the_scope->local_vars+i, len-i); } -#if 1 - local_cnt('_'); - local_cnt('~'); -#endif - lvtbl->tbl[0] = len; if (the_scope->local_tbl && the_scope->local_vars[-1] == 0) { free(the_scope->local_tbl); } the_scope->local_vars[-1] = 0; - the_scope->local_tbl = lvtbl->tbl; - lvtbl->nofree = 1; + the_scope->local_tbl = local_tbl(); } } local_pop(); -- cgit v1.2.3