ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl5-porters
perl5-porters
Re: Every.pm on CPAN
by Ted Zlatanov other posts by this author
Jul 24 2008 6:00AM messages near this date
Re: Every.pm on CPAN | Re: Every.pm on CPAN
On Sat, 19 Jul 2008 00:37:30 +0100 Ben Morrow <ben@[...].uk>  wrote: 

BM>  Something like this

BM>      IV
BM>      callsite()
BM>          INIT:
BM>      #if PERL_VERSION > 8
BM>              register PERL_CONTEXT *cx;
BM>      #endif
BM>          CODE:
BM>      #if PERL_VERSION > 8
BM>              cx = &cxstack[cxstack_ix];
BM>              RETVAL = (IV)(cx->blk_sub.retop);
BM>      #else
BM>              RETVAL = (IV)(PL_retstack[PL_retstack_ix - 1]);
BM>      #endif
BM>          OUTPUT:
BM>              RETVAL

BM>  might help... it returns the address of the op the current sub will
BM>  return to, which should be as unique as you need.

On Wed, 23 Jul 2008 15:47:43 -0500 "David Nicol" <davidnicol@[...].com>  wrote: 

DN>  Ben Morrow posted some XS to get a unique code for every instance of a
DN>  function call, although it wasn't wrapped in a module or anything like
DN>  that.  Did you find time to experiment with it?

I put together a module for it (Devel::Opcode, attached, copied from
Devel::Leak's structure) which reports the same opcode for two separate
calls of callsite() in test 5 (hence the warn() I left in there).  The
module is not ready for release (needs docs, plus test fails) and Ben
can choose to release it himself, of course, since I've done nothing but
packaging.  Ben, let me know if you want to take over.

Perhaps I've missed something; my XS experience is tiny and I may be
calling it wrong.

Ted
Thread:
Ted Zlatanov
Abigail
Ted Zlatanov
Ben Morrow
Roland Giersig
David Nicol
Ted Zlatanov
Ted Zlatanov
David Nicol
Ben Morrow
Ted Zlatanov
Chromatic
Aristotle Pagaltzis
Nicholas Clark
Yitzchak Scott-Thoennes
David Nicol
Ted Zlatanov
Abigail
Ted Zlatanov
Abigail
David Nicol
Ted Zlatanov
Aristotle Pagaltzis
Ted Zlatanov
David Cantrell
David Nicol
Eric Wilhelm
David Nicol
Ben Morrow
Aristotle Pagaltzis
Paul Johnson
David Nicol
Eric Brine
Gisle Aas
David Nicol
Nicholas Clark

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved