in reply to
Re^14: Perl 5 Optimizing Compiler, Part 4: LLVM Backend?
in thread Perl 5 Optimizing Compiler, Part 4: LLVM Backend?
- Because all that should be needed (on windows) is
#define PERL_GET_CONTEXT TlsGetValue(PL_thr_key)
#define PERL_SET_CONTEXT(t) TlsSetValue(PL_thr_key, (t))
Quite why those calls are bracketed to preserve information from a previous error is strange.
What previous error have we ignored -- by continuing to this piece of code -- that we want to retain the extended error information for?
And what are we going to do with that retained information? And when?
- Because you should only need to set or get it in those functions that use it.
And most of the functions that currently cart it about, don't use it.
Other than to pass it on to other functions they call, which also don't use it, but need to pass it on to the functions they call ...
Why not just get/set it in only those functions that use it?
The answer is apparently TLS is slow on on *nix, so this blunderbuss solution is the best option.
Despite that, from what I can see, Perl_get/set_context isn't called many places, or very often. But it is littered all over the source code -- just in case. Aarg!
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP Neil Armstrong