in reply to Re: Parse-Tree Macros : from LISP to Perl 6?
in thread Parse-Tree Macros : from LISP to Perl 6?

I can mess with the opcode tree ... I did eventually get farther with that code but never quite got it working. I blame it on my own incompetance at optree hacking. Seriously... B::Generate is quite the awesome module. There are other more mundane uses for this but it's still quite fun for just this one anyway.

Update: Oh duh. Ok well I did this in perl 5 which is offtopic from John's perl6 question but I rather expect (for no particular reason) that such hackery will become even easier for perl6

__SIG__ use B; printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE;

Replies are listed 'Best First'.
Re: Re^2: Parse-Tree Macros : from LISP to Perl 6?
by jryan (Vicar) on Nov 27, 2002 at 04:42 UTC

    I wouldn't be too sure about that. I doubt that the ability to hack the optree will be a central goal in the desing of the perl6 compiler. However, the compiler isn't anywhere near completed yet, so its probably too early to jump to any sort of conclusion about it.

    However, it should be possible to get at the intermediate compilition step, although it won't be as easy to manipulate.