summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-10-06 16:55:59 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-10-06 16:55:59 (GMT)
commit7b4b4ce6883578d1bc4bdd773251d1899787df6b (patch)
treee49b5cebdba72802c93ea65ce593d9479e53dae3 /generic
parent557af2c1ada9cecaa0e11f3a7f5c3c19056c5061 (diff)
downloadtcl-7b4b4ce6883578d1bc4bdd773251d1899787df6b.zip
tcl-7b4b4ce6883578d1bc4bdd773251d1899787df6b.tar.gz
tcl-7b4b4ce6883578d1bc4bdd773251d1899787df6b.tar.bz2
* 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.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclInterp.c21
1 files changed, 4 insertions, 17 deletions
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);