summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-07-10 16:17:12 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-07-10 16:17:12 (GMT)
commitee74db1cbf0cb0122fbab5591ad2361c0a1f3313 (patch)
treea2ee42334adf183949e00295f00807c849ad6753
parent7183692271c569478f4a05d434b0f75060abb900 (diff)
downloadtcl-ee74db1cbf0cb0122fbab5591ad2361c0a1f3313.zip
tcl-ee74db1cbf0cb0122fbab5591ad2361c0a1f3313.tar.gz
tcl-ee74db1cbf0cb0122fbab5591ad2361c0a1f3313.tar.bz2
Disabling the SetLineInformation() macro entirely causes only 3 tests
in the test suite to fail. Restoring just 2 SetLineInformation() calls fixes those failures. The need for all the other SLI() calls is not demonstrated by any test. Without more complete test coverage, it is difficult to confidently tweak the TIP 280 implementation without fear that changes are introducing breakage.
-rw-r--r--generic/tclCompCmdsGR.c2
-rw-r--r--generic/tclCompCmdsSZ.c2
-rw-r--r--generic/tclCompile.h9
3 files changed, 10 insertions, 3 deletions
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index f7c15e6..3cd0da6 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -265,6 +265,8 @@ TclCompileIfCmd(
if (compileScripts) {
SetLineInformation(wordIdx);
+envPtr->line = mapPtr->loc[eclIndex].line[wordIdx];
+envPtr->clNext = mapPtr->loc[eclIndex].next[wordIdx];
CompileBody(envPtr, tokenPtr, interp);
}
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index 855dd8f..8723a4f 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -726,6 +726,8 @@ TclCompileSubstCmd(
}
SetLineInformation(numArgs);
+envPtr->line = mapPtr->loc[eclIndex].line[numArgs];
+envPtr->clNext = mapPtr->loc[eclIndex].next[numArgs];
TclSubstCompile(interp, wordTokenPtr[1].start, wordTokenPtr[1].size,
flags, mapPtr->loc[eclIndex].line[numArgs], envPtr);
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 9af4911..6fe14f2 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1537,9 +1537,12 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
ExtCmdLoc *mapPtr = envPtr->extCmdMapPtr; \
int eclIndex = mapPtr->nuloc - 1
-#define SetLineInformation(word) \
- envPtr->line = mapPtr->loc[eclIndex].line[(word)]; \
- envPtr->clNext = mapPtr->loc[eclIndex].next[(word)]
+//#define SetLineInformation(word) \
+// envPtr->line = mapPtr->loc[eclIndex].line[(word)]; \
+// envPtr->clNext = mapPtr->loc[eclIndex].next[(word)]
+
+#define SetLineInformation(word)
+
#define PushVarNameWord(i,v,e,f,l,sc,word) \
TclPushVarName(i,v,e,f,l,sc, \