summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2002-06-28 21:24:19 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2002-06-28 21:24:19 (GMT)
commit32f7f3937935614ec8b97fbf6129de88b8e7a25d (patch)
tree5c960f835e745ff60159a4b2cb85cdc62e4b0076
parent886ba893b55833fb102f7849f51540124df6ca58 (diff)
downloadtcl-32f7f3937935614ec8b97fbf6129de88b8e7a25d.zip
tcl-32f7f3937935614ec8b97fbf6129de88b8e7a25d.tar.gz
tcl-32f7f3937935614ec8b97fbf6129de88b8e7a25d.tar.bz2
* generic/tclCompile.h: modified the macro TclEmitPush
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclCompile.h13
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 <msofer@users.sourceforge.net>
+
+ * 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 <dgp@users.sourceforge.net>
* 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)); \
+ }\
}
/*