diff options
author | dgp <dgp@users.sourceforge.net> | 2004-10-18 21:15:15 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2004-10-18 21:15:15 (GMT) |
commit | c1d97ce12a7418450665a45cf72e0e220fbf742e (patch) | |
tree | 15728b6d666ede40e4d63fa58ad35386c9728700 /generic/tclBasic.c | |
parent | c5e8b71d6e3be0bf8385db975f0f91a717cbd7e8 (diff) | |
download | tcl-c1d97ce12a7418450665a45cf72e0e220fbf742e.zip tcl-c1d97ce12a7418450665a45cf72e0e220fbf742e.tar.gz tcl-c1d97ce12a7418450665a45cf72e0e220fbf742e.tar.bz2 |
* generic/tclBasic.c (Tcl_CreateInterp,Tcl_DeleteInterp):
* generic/tclCmdAH.c (Tcl_CatchObjCmd):
* generic/tclCmdMZ.c (TclMergeReturnOptions,TclProcessReturn):
* generic/tclCompCmds.c (TclCompileReturnCmd):
* generic/tclExecute.c (TclCompEvalObj):
* generic/tclInt.h (Interp):
* generic/tclProc.c (TclUpdateReturnInfo):
Place primary storage of the -level and -code information in private
fields of the Interp struct, rather than in a DictObj. This should
significantly improve performance of TclUpdateReturnInfo.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 69a2453..84b934d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.127 2004/10/15 15:42:52 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.128 2004/10/18 21:15:34 dgp Exp $ */ #include "tclInt.h" @@ -233,13 +233,7 @@ Tcl_CreateInterp() Tcl_IncrRefCount(iPtr->returnLevelKey); iPtr->returnOptionsKey = Tcl_NewStringObj("-options",-1); Tcl_IncrRefCount(iPtr->returnOptionsKey); - iPtr->defaultReturnOpts = Tcl_NewDictObj(); - Tcl_DictObjPut(NULL, iPtr->defaultReturnOpts, - iPtr->returnCodeKey, Tcl_NewIntObj(TCL_OK)); - Tcl_DictObjPut(NULL, iPtr->defaultReturnOpts, - iPtr->returnLevelKey, Tcl_NewIntObj(1)); - Tcl_IncrRefCount(iPtr->defaultReturnOpts); - iPtr->returnOpts = iPtr->defaultReturnOpts; + iPtr->returnOpts = Tcl_NewObj(); Tcl_IncrRefCount(iPtr->returnOpts); iPtr->errorInfo = NULL; iPtr->eiVar = Tcl_NewStringObj("errorInfo", -1); @@ -247,6 +241,8 @@ Tcl_CreateInterp() iPtr->errorCode = NULL; iPtr->ecVar = Tcl_NewStringObj("errorCode", -1); Tcl_IncrRefCount(iPtr->ecVar); + iPtr->returnLevel = 0; + iPtr->returnCode = TCL_OK; iPtr->appendResult = NULL; iPtr->appendAvl = 0; @@ -994,7 +990,6 @@ DeleteInterpProc(interp) iPtr->errorInfo = NULL; } Tcl_DecrRefCount(iPtr->returnOpts); - Tcl_DecrRefCount(iPtr->defaultReturnOpts); Tcl_DecrRefCount(iPtr->returnCodeKey); Tcl_DecrRefCount(iPtr->returnErrorcodeKey); Tcl_DecrRefCount(iPtr->returnErrorinfoKey); |