summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2005-10-22 03:07:45 (GMT)
committermsofer <msofer@noemail.net>2005-10-22 03:07:45 (GMT)
commitdf4961a80660325037730842dfda4c1b6e37c43f (patch)
treed87b71cf870a187226d3eeaffbd7b281953a4b52
parent6ae1d97eea5e743155319b9d02e72f5459485709 (diff)
downloadtcl-df4961a80660325037730842dfda4c1b6e37c43f.zip
tcl-df4961a80660325037730842dfda4c1b6e37c43f.tar.gz
tcl-df4961a80660325037730842dfda4c1b6e37c43f.tar.bz2
* generic/tclExecute.c (INST_CONCAT): disable the optimisation for
wide integers, [Bug 1251791]. FossilOrigin-Name: c86eadfafe213e45f9873d39635ebb7fd4a1aa65
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclExecute.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5353cdc..095edc1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-22 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclExecute.c (INST_CONCAT): disable the optimisation for
+ wide integers, [Bug 1251791].
+
2005-10-14 Zoran Vasiljevic <vasiljevic@users.sourceforge.net>
* generic/tclIO.c (Tcl_ClearChannelHandlers): removed
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 5161b17..ef4b7d4 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.94.2.14 2005/08/29 16:37:42 kennykb Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.94.2.15 2005/10/22 03:07:45 msofer Exp $
*/
#include "tclInt.h"
@@ -1265,10 +1265,12 @@ TclExecuteByteCode(interp, codePtr)
/*
* Peephole optimisation for appending an empty string.
* This enables replacing 'K $x [set x{}]' by '$x[set x{}]'
- * for fastest execution.
+ * for fastest execution. Avoid doing the optimisation for wide
+ * ints - a case where equal strings may refer to different values
+ * (see [Bug 1251791]).
*/
- if (opnd == 2) {
+ if ((opnd == 2) && (stackPtr[stackTop-1]->typePtr != &tclWideIntType)) {
Tcl_GetStringFromObj(stackPtr[stackTop], &length);
if (length == 0) {
/* Just drop the top item from the stack */