You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a way to store the call stack at the Perl level without having to copy it with a loop through caller. Ideally it's a ref counted pointer to the internal Perl call stack structure.
The interface should be a CallStack object (which doesn't exist) that provides a lazy interface to the underlying C structure. It should do minimal work on initialization.
Rationale: It could be nice if exceptions could provide the whole call stack for the exception, but since that will be used rarely it would be inefficient to copy the whole thing using caller.
The text was updated successfully, but these errors were encountered:
@Leont Interesting. So, potentially, the exception object would call caller_cx(level) in a loop to get the whole stack and store it in an array of PERL_CONTEXT. Or is that already what cxstack is? Could the Exception potentially store cxstack (would it need to be copied?) and interrogate it later if it's requested?
The goal here is to store the stack, but avoid having to do a lot of work if it's never used.
Interesting. So, potentially, the exception object would call caller_cx(level) in a loop to get the whole stack and store it in an array of PERL_CONTEXT.
Basically, yes. The point is to store a bunch of frames (relatively cheap) that can be later expanded into the full caller information if necessary.
Could the Exception potentially store cxstack (would it need to be copied?) and interrogate it later if it's requested?
AFAIK copying will be necessary, as it will be unwound during the exception handling (just like the other stacks), it's been 5 years since I've used that part of perl though.
Provide a way to store the call stack at the Perl level
without
having to copy it with a loop throughcaller
. Ideally it's a ref counted pointer to the internal Perl call stack structure.The interface should be a CallStack object (which doesn't exist) that provides a lazy interface to the underlying C structure. It should do minimal work on initialization.
Rationale: It could be nice if exceptions could provide the whole call stack for the exception, but since that will be used rarely it would be inefficient to copy the whole thing using
caller
.The text was updated successfully, but these errors were encountered: