summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-05-10 16:05:48 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-05-10 16:05:48 (GMT)
commitf9dece7738d140a66ebb5d47ee85c4d57249258a (patch)
tree1ca2feda250662282a8e77080fef123d9256b839 /generic/tclExecute.c
parentb1c2f2c9c6fcb329f1e23f9f5f1ef53c84b01bae (diff)
downloadtcl-f9dece7738d140a66ebb5d47ee85c4d57249258a.zip
tcl-f9dece7738d140a66ebb5d47ee85c4d57249258a.tar.gz
tcl-f9dece7738d140a66ebb5d47ee85c4d57249258a.tar.bz2
Completed patch with mucho comments. Merge 8.5.bug_3173086
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c76
1 files changed, 37 insertions, 39 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 6ef4ac7..dc87d70 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -1473,57 +1473,55 @@ TclCompEvalObj(
* information.
*/
- {
+ if (invoker) {
Tcl_HashEntry *hePtr =
Tcl_FindHashEntry(iPtr->lineBCPtr, (char *) codePtr);
if (hePtr) {
ExtCmdLoc *eclPtr = Tcl_GetHashValue(hePtr);
int redo = 0;
+ CmdFrame *ctxPtr = TclStackAlloc(interp,sizeof(CmdFrame));
- if (invoker) {
- CmdFrame *ctxPtr = TclStackAlloc(interp,sizeof(CmdFrame));
- *ctxPtr = *invoker;
-
- if (invoker->type == TCL_LOCATION_BC) {
- /*
- * Note: Type BC => ctx.data.eval.path is not used.
- * ctx.data.tebc.codePtr used instead
- */
-
- TclGetSrcInfoForPc(ctxPtr);
- if (ctxPtr->type == TCL_LOCATION_SOURCE) {
- /*
- * The reference made by 'TclGetSrcInfoForPc' is
- * dead.
- */
-
- Tcl_DecrRefCount(ctxPtr->data.eval.path);
- ctxPtr->data.eval.path = NULL;
- }
- }
+ *ctxPtr = *invoker;
- if (word < ctxPtr->nline) {
+ if (invoker->type == TCL_LOCATION_BC) {
+ /*
+ * Note: Type BC => ctx.data.eval.path is not used.
+ * ctx.data.tebc.codePtr used instead
+ */
+
+ TclGetSrcInfoForPc(ctxPtr);
+ if (ctxPtr->type == TCL_LOCATION_SOURCE) {
/*
- * Note: We do not care if the line[word] is -1. This
- * is a difference and requires a recompile (location
- * changed from absolute to relative, literal is used
- * fixed and through variable)
- *
- * Example:
- * test info-32.0 using literal of info-24.8
- * (dict with ... vs set body ...).
+ * The reference made by 'TclGetSrcInfoForPc' is
+ * dead.
*/
-
- redo = ((eclPtr->type == TCL_LOCATION_SOURCE)
- && (eclPtr->start != ctxPtr->line[word]))
- || ((eclPtr->type == TCL_LOCATION_BC)
- && (ctxPtr->type == TCL_LOCATION_SOURCE));
+
+ Tcl_DecrRefCount(ctxPtr->data.eval.path);
+ ctxPtr->data.eval.path = NULL;
}
-
- TclStackFree(interp, ctxPtr);
}
-
+
+ if (word < ctxPtr->nline) {
+ /*
+ * Note: We do not care if the line[word] is -1. This
+ * is a difference and requires a recompile (location
+ * changed from absolute to relative, literal is used
+ * fixed and through variable)
+ *
+ * Example:
+ * test info-32.0 using literal of info-24.8
+ * (dict with ... vs set body ...).
+ */
+
+ redo = ((eclPtr->type == TCL_LOCATION_SOURCE)
+ && (eclPtr->start != ctxPtr->line[word]))
+ || ((eclPtr->type == TCL_LOCATION_BC)
+ && (ctxPtr->type == TCL_LOCATION_SOURCE));
+ }
+
+ TclStackFree(interp, ctxPtr);
+
if (redo) {
goto recompileObj;
}