diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2007-08-10 00:43:44 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2007-08-10 00:43:44 (GMT) |
commit | cf7b7f6b1016f759ee3f69432ab8ac66daea06b4 (patch) | |
tree | d42639d5fced511da8d6c666e5f6ef559b31e33e /generic/tclProc.c | |
parent | fcd17ae019c89d4f1cd1f82e1c04ba022c275f77 (diff) | |
download | tcl-cf7b7f6b1016f759ee3f69432ab8ac66daea06b4.zip tcl-cf7b7f6b1016f759ee3f69432ab8ac66daea06b4.tar.gz tcl-cf7b7f6b1016f759ee3f69432ab8ac66daea06b4.tar.bz2 |
* generic/tclProc.c (TclCreateProc): better comments on the
required varflag values when loading precompiled procs.
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r-- | generic/tclProc.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c index 026a836..ca8aa4f 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.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: tclProc.c,v 1.130 2007/08/08 22:57:14 hobbs Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.131 2007/08/10 00:43:44 msofer Exp $ */ #include "tclInt.h" @@ -525,21 +525,20 @@ TclCreateProc( if (precompiled) { /* - * Compare the parsed argument with the stored one. For the flags, - * we and out VAR_UNDEFINED to support bridging precompiled <= 8.3 - * code in 8.4 where this is now used as an optimization - * indicator. Yes, this is a hack. -- hobbs + * Compare the parsed argument with the stored one. Note that the + * only flag value that makes sense at this point is VAR_ARGUMENT + * (its value was kept the same as pre VarReform to simplify + * tbcload's processing of older byetcodes). * - * FIXME! Is this right? It does depend on VAR_ARGUMENT not - * changing. Note that a change of VAR_TEMPORARY would not be so - * important, as there are no variable names in precompiled - * bytecodes anyway - right? + * The only other flag vlaue that is important to retrieve from + * precompiled procs is VAR_TEMPORARY (also unchanged). It is + * needed later when retrieving the variable names. */ if ((localPtr->nameLength != nameLength) || (strcmp(localPtr->name, fieldValues[0])) || (localPtr->frameIndex != i) - || !(localPtr->flags & VAR_ARGUMENT) /* /// CHECK HERE! */ + || !(localPtr->flags & VAR_ARGUMENT) || (localPtr->defValuePtr == NULL && fieldCount == 2) || (localPtr->defValuePtr != NULL && fieldCount != 2)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( |