From 32f7f3937935614ec8b97fbf6129de88b8e7a25d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 28 Jun 2002 21:24:19 +0000 Subject: * generic/tclCompile.h: modified the macro TclEmitPush --- ChangeLog | 6 ++++++ generic/tclCompile.h | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a45a97..a845990 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-06-28 Miguel Sofer + + * generic/tclCompile.h: modified the macro TclEmitPush to not + call its first argument repeatedly or pass it to other macros, + [Bug 575194] reported by Peter Spjuth. + 2002-06-28 Don Porter * docs/tcltest.n: Doc revisions in progress. diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 8a04dac..d76d405 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.27 2002/05/30 15:03:57 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.28 2002/06/28 21:24:19 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -932,10 +932,13 @@ EXTERN void TclVerifyLocalLiteralTable _ANSI_ARGS_(( */ #define TclEmitPush(objIndex, envPtr) \ - if ((objIndex) <= 255) { \ - TclEmitInstInt1(INST_PUSH1, (objIndex), (envPtr)); \ - } else { \ - TclEmitInstInt4(INST_PUSH4, (objIndex), (envPtr)); \ + {\ + register int objIndexCopy = (objIndex);\ + if (objIndexCopy <= 255) { \ + TclEmitInstInt1(INST_PUSH1, objIndexCopy, (envPtr)); \ + } else { \ + TclEmitInstInt4(INST_PUSH4, objIndexCopy, (envPtr)); \ + }\ } /* -- cgit v0.12