diff options
author | dgp <dgp@users.sourceforge.net> | 2013-07-10 16:17:12 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-07-10 16:17:12 (GMT) |
commit | 79cd9409e13c0854f7eb3f04d970e44b30c3ec7d (patch) | |
tree | a2ee42334adf183949e00295f00807c849ad6753 | |
parent | 17ffd6902101268bd8cc522ed62049279e2894d5 (diff) | |
download | tcl-79cd9409e13c0854f7eb3f04d970e44b30c3ec7d.zip tcl-79cd9409e13c0854f7eb3f04d970e44b30c3ec7d.tar.gz tcl-79cd9409e13c0854f7eb3f04d970e44b30c3ec7d.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.c | 2 | ||||
-rw-r--r-- | generic/tclCompCmdsSZ.c | 2 | ||||
-rw-r--r-- | generic/tclCompile.h | 9 |
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, \ |