develooper Front page | perl.perl5.porters | Postings from July 2016

Re: async/await syntax - call to action

Thread Previous
From:
Paul "LeoNerd" Evans
Date:
July 1, 2016 21:33
Subject:
Re: async/await syntax - call to action
Message ID:
20160701223249.3a6fb6ea@shy.leonerd.org.uk
On Fri, 1 Jul 2016 22:15:27 +0100
"Paul \"LeoNerd\" Evans" <leonerd@leonerd.org.uk> wrote:

> I would like this to be implemented by the code in 'supersize' (which
> I imagine would have to be an XS function) mutating the CVs stored in
> the &one, &five, and &ten globs themselves, so that any caller with
> any reference to these functions will observe the same result. It is
> further required that, if these so-modified functions are either
> exported, or stand as object methods, that other callers to these
> functions see the intended values (1, 5, 10) without themselves
> needing to be aware of supersize in any way.

I probably ought to add that it would be cheating to rely on the
trivially-small nature of these three given test functions. The
solution ought to be generic enough to cope with any function body,
because it should somehow hook itself dynamically "after" the return
value has been calculated and placed on the stack but before the
actual result has been transferred to the caller.

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About