| |
485 |
485 |
varFramePtr = Tcl_CallFrame_callerPtr(varFramePtr)) { |
| |
486 |
486 |
|
| |
487 |
487 |
if (((unsigned int)Tcl_CallFrame_isProcCallFrame(varFramePtr) & (FRAME_IS_NSF_METHOD|FRAME_IS_NSF_CMETHOD)) != 0u) { |
| |
488 |
488 |
if (framePtrPtr != NULL) { |
| |
489 |
489 |
*framePtrPtr = varFramePtr; |
| |
490 |
490 |
} |
| |
491 |
491 |
return (NsfCallStackContent *)Tcl_CallFrame_clientData(varFramePtr); |
| |
492 |
492 |
} |
| |
493 |
493 |
} |
| |
494 |
494 |
if (framePtrPtr != NULL) { |
| |
495 |
495 |
*framePtrPtr = NULL; |
| |
496 |
496 |
} |
| |
497 |
497 |
return NULL; |
| |
498 |
498 |
} |
| |
499 |
499 |
|
| |
500 |
500 |
NSF_INLINE static NsfCallStackContent* CallStackGetTopFrame0(const Tcl_Interp *interp) nonnull(1); |
| |
501 |
501 |
|
| |
502 |
502 |
NSF_INLINE static NsfCallStackContent* |
| |
503 |
503 |
CallStackGetTopFrame0(const Tcl_Interp *interp) { |
| |
504 |
504 |
register Tcl_CallFrame *varFramePtr; |
| |
|
505 |
NsfCallStackContent *result = NULL; |
| |
505 |
506 |
|
| |
506 |
507 |
nonnull_assert(interp != NULL); |
| |
507 |
508 |
|
| |
508 |
509 |
for (varFramePtr = (Tcl_CallFrame *)Tcl_Interp_varFramePtr(interp); |
| |
509 |
510 |
varFramePtr != NULL; |
| |
510 |
511 |
varFramePtr = Tcl_CallFrame_callerPtr(varFramePtr)) { |
| |
511 |
512 |
if (likely(((unsigned int)Tcl_CallFrame_isProcCallFrame(varFramePtr) & (FRAME_IS_NSF_METHOD|FRAME_IS_NSF_CMETHOD)) != 0u)) { |
| |
512 |
|
return (NsfCallStackContent *)Tcl_CallFrame_clientData(varFramePtr); |
| |
|
513 |
result = (NsfCallStackContent *)Tcl_CallFrame_clientData(varFramePtr); |
| |
|
514 |
break; |
| |
513 |
515 |
} |
| |
514 |
516 |
} |
| |
515 |
|
return NULL; |
| |
|
517 |
return result; |
| |
516 |
518 |
} |
| |
517 |
519 |
|
| |
518 |
520 |
#if defined(NSF_PROFILE) |
| |
519 |
521 |
NsfCallStackContent* NsfCallStackGetTopFrame(const Tcl_Interp *interp, Tcl_CallFrame **framePtrPtr) nonnull(1); |
| |
520 |
522 |
|
| |
521 |
523 |
NsfCallStackContent* |
| |
522 |
524 |
NsfCallStackGetTopFrame(const Tcl_Interp *interp, Tcl_CallFrame **framePtrPtr) { |
| |
523 |
525 |
return CallStackGetTopFrame(interp, framePtrPtr); |
| |
524 |
526 |
} |
| |
525 |
527 |
#endif |
| |
526 |
528 |
|
| |
527 |
529 |
|
| |
528 |
530 |
|
| |
529 |
531 |
|
| |
530 |
532 |
|
| |
531 |
533 |
|
| |
532 |
534 |
|
| |
533 |
535 |
|
| |
534 |
536 |
|
| |
535 |
537 |
|