From 7b4b4ce6883578d1bc4bdd773251d1899787df6b Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 6 Oct 2009 16:55:59 +0000 Subject: * generic/tclInterp.c (SlaveEval): Agressive stomping of internal reps was added as part of the NRE patch of 2008-07-13. This doesn't appear to actually be needed, and it hurts quite a bit when large lists lose their intreps and require reparsing. Thanks to Ashok Nadkarni for reporting the problem. --- ChangeLog | 6 ++++++ generic/tclInterp.c | 21 ++++----------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6eac1bf..e035f7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-10-06 Don Porter + * generic/tclInterp.c (SlaveEval): Agressive stomping of internal reps + was added as part of the NRE patch of 2008-07-13. This doesn't appear + to actually be needed, and it hurts quite a bit when large lists lose + their intreps and require reparsing. Thanks to Ashok Nadkarni for + reporting the problem. + * generic/tclTomMathInt.h (new): Public header tclTomMath.h had * generic/tclTomMath.h: dependence on private headers, breaking use * generic/tommath.h: by extensions [Bug 1941434]. diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 0972602..3c841d9 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.105 2009/03/21 12:24:49 msofer Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.106 2009/10/06 16:55:59 dgp Exp $ */ #include "tclInt.h" @@ -2607,7 +2607,6 @@ SlaveEval( Tcl_Obj *const objv[]) /* Argument objects. */ { int result; - Tcl_Obj *objPtr; Tcl_Preserve(slaveInterp); Tcl_AllowExceptions(slaveInterp); @@ -2615,29 +2614,17 @@ SlaveEval( if (objc == 1) { /* * TIP #280: Make actual argument location available to eval'd script. - * - * Do not let any intReps accross, with the exception of - * bytecodes. The intrep spoiling is due to happen anyway when - * compiling. */ Interp *iPtr = (Interp *) interp; CmdFrame *invoker = iPtr->cmdFramePtr; int word = 0; - objPtr = objv[0]; - if (objPtr->typePtr && (objPtr->typePtr != &tclByteCodeType) - && objPtr->typePtr->freeIntRepProc) { - (void) TclGetString(objPtr); - TclFreeIntRep(objPtr); - objPtr->typePtr = NULL; - } - - TclArgumentGet(interp, objPtr, &invoker, &word); + TclArgumentGet(interp, objv[0], &invoker, &word); - result = TclEvalObjEx(slaveInterp, objPtr, 0, invoker, word); + result = TclEvalObjEx(slaveInterp, objv[0], 0, invoker, word); } else { - objPtr = Tcl_ConcatObj(objc, objv); + Tcl_Obj *objPtr = Tcl_ConcatObj(objc, objv); Tcl_IncrRefCount(objPtr); result = Tcl_EvalObjEx(slaveInterp, objPtr, 0); Tcl_DecrRefCount(objPtr); -- cgit v0.12