threads branch: What is purpose of lib/Parrot/Pmc2c/PMC/Proxy.pm?
Stefan Seifert
nine at detonation.org
Wed Aug 15 08:17:36 UTC 2012
On Saturday 11 August 2012 21:34:02 James E Keenan wrote:
> On 8/11/12 8:48 PM, James E Keenan wrote:
> > But Pmc2cMain never invokes pre_method_gen(). Hence, nothing from
> > lib/Parrot/Pmc2c/PMC/Proxy.pm appears to be used anywhere -- implying
> > that it can and should be deleted.
>
> Well, testing proved my reasoning wrong. When I deleted
> lib/Parrot/Pmc2c/PMC/Proxy.pm, I built the threads branch successfully
> -- on Linux/i386 -- but encountered these test failures:
This little stacktrace should explain how the module is loaded and how the
method ends up being called:
pre_method_gen in Proxy used
at tools/build/../../lib/Parrot/Pmc2c/PMC/Proxy.pm line 34
Parrot::Pmc2c::PMC::Proxy::pre_method_gen('Parrot::Pmc2c::PMC::Proxy=HASH(0x11a41f8)')
called at tools/build/../../lib/Parrot/Pmc2c/Parser.pm line 95
Parrot::Pmc2c::Parser::parse_pmc('Parrot::Pmc2c::Pmc2cMain=HASH(0xf93f20)',
'src/pmc/proxy.pmc')
called at tools/build/../../lib/Parrot/Pmc2c/Dumper.pm line 57
Parrot::Pmc2c::Dumper::dump_pmc('Parrot::Pmc2c::Pmc2cMain=HASH(0xf93f20)')
called at tools/build/pmc2c.pl line 50
> > Can anyone explain what lib/Parrot/Pmc2c/PMC/Proxy.pm does?
>
> Question is still relevant.
It's simple: the Proxy PMC used in threading is a read only proxy delegating
all read calls to the proxied PMC and raising an exception for all attempts to
write to the PMC. Almost all of it's methods are auto generated and the
recipie is in Parrot::Pmc2c::PMC::Proxy. I added some description to the file.
Stefan
More information about the parrot-dev
mailing list