Compare commits

...
11 Commits
Author SHA1 Message Date
dgp 46a5182264 merge 8.5 2018-04-30 12:47:23 +00:00
dgp 5c11f65daa Style guide and tidying up. 2012-03-07 21:21:51 +00:00
dgp cbd3a12beb merge 8.5 to bugfix 2012-03-07 21:03:06 +00:00
sebres fa3c34d94d experimental trying to use TclGetSrcInfoForCmd without special sentinel ENSEMBLE_PSEUDO_COMMAND 2012-03-07 15:40:59 +00:00
dgp cb573bd881 Better conform to Tcl style guidelines. 2012-03-05 20:47:18 +00:00
dgp be902780f4 Backdoor kludge to let traced ensemble subcommands gain access to the
string command of the original, avoiding expensive reconstruction from
the parsed words.
2012-03-05 19:11:48 +00:00
sebres 52005aa794 clarify and review code 2012-03-01 09:29:27 +00:00
dkf bd76a293b8 Minor change: clarify code to indicate magical sentinel values. 2012-02-14 14:44:36 +00:00
sergey.brester 034eb429a1 Testing of fixing execution trace, overhead by ensemble commands 2012-02-14 13:06:28 +00:00
dkf 5577aacab9 Define dependencies in Makefile. 2012-02-10 08:25:14 +00:00
dgp 6c6df5ad71 Testing speedup of TclScanElement(). 2012-02-09 18:38:55 +00:00
3 changed files with 23 additions and 9 deletions
+9 -6
View File
@@ -3091,6 +3091,9 @@ CallCommandTraces(
* command. This insures that traces get a correct NUL-terminated command
* string.
*
* If 'command' has value (char*)-1, this function calls
* TclGetSrcInfoForCmd() to obtain the source string. This is used
* to retrieve suitable source strings for bytecode exection.
*----------------------------------------------------------------------
*/
@@ -3102,13 +3105,13 @@ GetCommandSource(
int objc,
Tcl_Obj *const objv[])
{
if (!command) {
return Tcl_NewListObj(objc, objv);
}
if (command == (char *) -1) {
command = TclGetSrcInfoForCmd(iPtr, &numChars);
}
return Tcl_NewStringObj(command, numChars);
if (command) {
return Tcl_NewStringObj(command, numChars);
}
return Tcl_NewListObj(objc, objv);
}
/*
@@ -3605,8 +3608,8 @@ TclEvalObjvInternal(
* for traces. NULL if the string
* representation of the command is unknown is
* to be generated from (objc,objv), -1 if it
* is to be generated from bytecode
* source. This is only needed the traces. */
* is to be generated from bytecode source.
* This is only needed the traces. */
int length, /* Number of bytes in command; if -1, all
* characters up to the first null byte are
* used. */
+9 -1
View File
@@ -7755,7 +7755,15 @@ TclGetSrcInfoForCmd(
int *lenPtr)
{
CmdFrame *cfPtr = iPtr->cmdFramePtr;
ByteCode *codePtr = (ByteCode *) cfPtr->data.tebc.codePtr;
ByteCode *codePtr;
if (!cfPtr) {
return NULL;
}
codePtr = (ByteCode *) cfPtr->data.tebc.codePtr;
if (!codePtr || !cfPtr->data.tebc.pc) {
return NULL;
}
return GetSrcInfoForPc((unsigned char *) cfPtr->data.tebc.pc,
codePtr, lenPtr);
+5 -2
View File
@@ -6241,10 +6241,13 @@ NsEnsembleImplementationCmd(
/*
* Hand off to the target command.
* [sebres] call from ensemble, use TEBC to retrive command trace
* from main ensemble.
*/
result = Tcl_EvalObjv(interp, objc-2+prefixObjc, tempObjv,
TCL_EVAL_INVOKE);
result = TclEvalObjvInternal(interp, objc-2+prefixObjc, tempObjv,
/* call from TEBC, TclGetSrcInfoForCmd */(char *) -1,
-1, TCL_EVAL_INVOKE);
/*
* Clean up.