summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-07-15 20:38:06 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-07-15 20:38:06 (GMT)
commit0c4b317788a3e217ab19cb83cbaee43246e59208 (patch)
treee95e491244dc4b4fcb17173ab29a47669aef7f37
parent2a742953e9fda7a3ead7692257f142cf71d4f36e (diff)
downloadtcl-0c4b317788a3e217ab19cb83cbaee43246e59208.zip
tcl-0c4b317788a3e217ab19cb83cbaee43246e59208.tar.gz
tcl-0c4b317788a3e217ab19cb83cbaee43246e59208.tar.bz2
With the (causes of the) bug removed; now remove the faulty fix too.
-rw-r--r--generic/tclBasic.c44
-rw-r--r--generic/tclCompile.h2
-rw-r--r--generic/tclLiteral.c45
3 files changed, 0 insertions, 91 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 53023d8..2ca90fd 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -1943,17 +1943,6 @@ Tcl_ExposeCommand(
}
/*
- * Command resolvers (per-interp, per-namespace) might have resolved to a
- * command for the given namespace scope with this command not being
- * registered with the namespace's command table. During BC compilation,
- * the so-resolved command turns into a CmdName literal. Without
- * invalidating a possible CmdName literal here explicitly, such literals
- * keep being reused while pointing to overhauled commands.
- */
-
- TclInvalidateCmdLiteral(interp, cmdName, nsPtr);
-
- /*
* The list of command exported from the namespace might have changed.
* However, we do not need to recompute this just yet; next time we need
* the info will be soon enough.
@@ -2109,17 +2098,6 @@ Tcl_CreateCommand(
ckfree(Tcl_GetHashValue(hPtr));
}
} else {
- /*
- * Command resolvers (per-interp, per-namespace) might have resolved
- * to a command for the given namespace scope with this command not
- * being registered with the namespace's command table. During BC
- * compilation, the so-resolved command turns into a CmdName literal.
- * Without invalidating a possible CmdName literal here explicitly,
- * such literals keep being reused while pointing to overhauled
- * commands.
- */
-
- TclInvalidateCmdLiteral(interp, tail, nsPtr);
/*
* The list of command exported from the namespace might have changed.
@@ -2305,17 +2283,6 @@ Tcl_CreateObjCommand(
ckfree(Tcl_GetHashValue(hPtr));
}
} else {
- /*
- * Command resolvers (per-interp, per-namespace) might have resolved
- * to a command for the given namespace scope with this command not
- * being registered with the namespace's command table. During BC
- * compilation, the so-resolved command turns into a CmdName literal.
- * Without invalidating a possible CmdName literal here explicitly,
- * such literals keep being reused while pointing to overhauled
- * commands.
- */
-
- TclInvalidateCmdLiteral(interp, tail, nsPtr);
/*
* The list of command exported from the namespace might have changed.
@@ -2628,17 +2595,6 @@ TclRenameCommand(
TclInvalidateNsCmdLookup(cmdPtr->nsPtr);
/*
- * Command resolvers (per-interp, per-namespace) might have resolved to a
- * command for the given namespace scope with this command not being
- * registered with the namespace's command table. During BC compilation,
- * the so-resolved command turns into a CmdName literal. Without
- * invalidating a possible CmdName literal here explicitly, such literals
- * keep being reused while pointing to overhauled commands.
- */
-
- TclInvalidateCmdLiteral(interp, newTail, cmdPtr->nsPtr);
-
- /*
* Script for rename traces can delete the command "oldName". Therefore
* increment the reference count for cmdPtr so that it's Command structure
* is freed only towards the end of this function by calling
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index f99c07c..aa96ef0 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1160,8 +1160,6 @@ MODULE_SCOPE void TclPushVarName(Tcl_Interp *interp,
MODULE_SCOPE void TclPreserveByteCode(ByteCode *codePtr);
MODULE_SCOPE void TclReleaseByteCode(ByteCode *codePtr);
MODULE_SCOPE void TclReleaseLiteral(Tcl_Interp *interp, Tcl_Obj *objPtr);
-MODULE_SCOPE void TclInvalidateCmdLiteral(Tcl_Interp *interp,
- const char *name, Namespace *nsPtr);
MODULE_SCOPE int TclSingleOpCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index e0425cf..e53d709 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -993,51 +993,6 @@ RebuildLiteralTable(
}
}
-/*
- *----------------------------------------------------------------------
- *
- * TclInvalidateCmdLiteral --
- *
- * Invalidate a command literal entry, if present in the literal hash
- * tables, by resetting its internal representation. This invalidation
- * leaves it in the literal tables and in existing literal arrays. As a
- * result, existing references continue to work but we force a fresh
- * command look-up upon the next use (see, in particular,
- * TclSetCmdNameObj()).
- *
- * Results:
- * None.
- *
- * Side effects:
- * Resets the internal representation of the CmdName Tcl_Obj
- * using TclFreeIntRep().
- *
- *----------------------------------------------------------------------
- */
-
-void
-TclInvalidateCmdLiteral(
- Tcl_Interp *interp, /* Interpreter for which to invalidate a
- * command literal. */
- const char *name, /* Points to the start of the cmd literal
- * name. */
- Namespace *nsPtr) /* The namespace for which to lookup and
- * invalidate a cmd literal. */
-{
- Interp *iPtr = (Interp *) interp;
- Tcl_Obj *literalObjPtr = TclCreateLiteral(iPtr, (char *) name,
- strlen(name), -1, NULL, nsPtr, 0, NULL);
-
- if (literalObjPtr != NULL) {
- if (literalObjPtr->typePtr == &tclCmdNameType) {
- TclFreeIntRep(literalObjPtr);
- }
- /* Balance the refcount effects of TclCreateLiteral() above */
- Tcl_IncrRefCount(literalObjPtr);
- TclReleaseLiteral(interp, literalObjPtr);
- }
-}
-
#ifdef TCL_COMPILE_STATS
/*
*----------------------------------------------------------------------