Skip to content

Commit f9bed86

Browse files
authored
Merge pull request #11 from ramikhaldi/master
TIP #571: Fix the TclX's profiler to be conform with the NRE
2 parents 0b870ee + c935205 commit f9bed86

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

generic/tclXprofile.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,10 @@ ProfTraceRoutine (ClientData clientData,
571571
if (cmd == NULL)
572572
panic (PROF_PANIC, 4);
573573

574+
//TIP #571: We don' want to profile the tailcall itself. As it can only be called in a procedure/lambda context
575+
if ( ! strcmp((*objv)->bytes, "tailcall") ) {
576+
return TCL_OK;
577+
}
574578
/*
575579
* Save current state information.
576580
*/

0 commit comments

Comments
 (0)