From 79cd9409e13c0854f7eb3f04d970e44b30c3ec7d Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 10 Jul 2013 16:17:12 +0000 Subject: 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. --- generic/tclCompCmdsGR.c | 2 ++ generic/tclCompCmdsSZ.c | 2 ++ 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, \ -- cgit v0.12