summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormig <mig>2011-03-27 22:43:42 (GMT)
committermig <mig>2011-03-27 22:43:42 (GMT)
commitebe7cfc96d8d03998cc3df2030e3d56733082640 (patch)
tree7c9f063599246198148dc2b0c3c2cff5e91d46ad
parent5d8e6c3cce8cdfbf23d812e1048233a2357c8edc (diff)
downloadtcl-ebe7cfc96d8d03998cc3df2030e3d56733082640.zip
tcl-ebe7cfc96d8d03998cc3df2030e3d56733082640.tar.gz
tcl-ebe7cfc96d8d03998cc3df2030e3d56733082640.tar.bz2
* generic/tclBasic.c (TclNREvalObjEx): fix performance issue, notably apparent in tclbench's 'LIST lset foreach'. Many thanks to twylite for patiently researching the issue and explaining it to me: a missing Tcl_ResetObjResult that causes unwanted sharing of the current result Tcl_Obj.
-rw-r--r--ChangeLog8
-rw-r--r--generic/tclBasic.c3
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cb9f5c3..23b91b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-03-27 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclBasic.c (TclNREvalObjEx): fix performance issue,
+ notably apparent in tclbench's "LIST lset foreach". Many thanks to
+ twylite for patiently researching the issue and explaining it to
+ me: a missing Tcl_ResetObjResult that causes unwanted sharing of
+ the current result Tcl_Obj.
+
2011-03-26 Donal K. Fellows <dkf@users.sf.net>
* generic/tclNamesp.c (Tcl_Export, Tcl_Import, DoImport): More
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 5f2b301..b34209b 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -6018,6 +6018,9 @@ TclNREvalObjEx(
* iPtr->varFramePtr in case
* TCL_EVAL_GLOBAL was set. */
+ if (TclInterpReady(interp) != TCL_OK) {
+ return TCL_ERROR;
+ }
if (flags & TCL_EVAL_GLOBAL) {
savedVarFramePtr = iPtr->varFramePtr;
iPtr->varFramePtr = iPtr->rootFramePtr;