Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [perl #41364] [PATCH] Fixed object vtable method overrides in PIR

0 views
Skip to first unread message

Patrick R. Michaud

unread,
Jan 28, 2007, 4:47:59 PM1/28/07
to perl6-i...@perl.org
On Sat, Jan 27, 2007 at 11:39:16AM -0800, Alek Storm wrote:
> Also, though this is more of a language design question,
> shouldn't we deprecate the double-underscore method of overriding, since we
> now have the :vtable flag?

Just a note that we cannot deprecate the double-underscore method
of overriding vtable methods until RT #40626 is resolved.

RT #40626 notes that the :vtable pragma isn't currently working
for PIR code compiled into .pbc files -- see the sample program
in RT #40626. And, just for completeness, I tried the test program
after applying the patch in #41364 and got the same results
(this is not unexpected, I'm guessing that #41364 is addressing
a different issue).

Thanks!

Pm

Allison Randal via RT

unread,
Feb 17, 2007, 11:18:48 AM2/17/07
to perl6-i...@perl.org
On Sat Jan 27 11:39:15 2007, alek....@gmail.com wrote:
> This patch allows object vtable method overrides for find_method,
get_attr,
> get_attr, get_attr_str, set_attr, set_attr_str, and get_class. Now these
> can be overridden in PIR using the :vtable flag or prefixing their
> respective names with "__". It affects src/pmc/parrotobject.pmc and
> src/ops/object.ops.

Thanks. The patch looks good. Could you also supply a regression test
that demonstrates what was failing before the patch, and passes with the
patch applied? Something along the lines of the attached patch, though I
only spent a few minutes on it and expect you'll want to expand it.

Allison

test_overriding_findmethod.patch

Alek Storm

unread,
Feb 25, 2007, 11:09:28 PM2/25/07
to parrotbug...@parrotcode.org
Now that 0.4.9 has been released, can this be committed?

Thanks,
Alek Storm


On 2/19/07, Alek Storm <alek....@gmail.com> wrote:
> Thanks for the head start; now I know to include a test in the future.
> Here is an updated version of your patch, with various minor fixes.

jnthn@jnthn.net via RT

unread,
Mar 2, 2007, 5:25:03 PM3/2/07
to perl6-i...@perl.org
On Sun Feb 25 20:10:00 2007, alek....@gmail.com wrote:
> Now that 0.4.9 has been released, can this be committed?
>
I just tried, but I get:

/home/default/jnthn.net/dev/parrot/blib/lib/libparrot.so: undefined
reference to `find_vtable_meth'
collect2: ld returned 1 exit status

After applying it. Any ideas?

Jonathan

Alek Storm

unread,
Mar 4, 2007, 2:07:49 PM3/4/07
to parrotbug...@parrotcode.org
That's because the patch refers to a function that is now outdated because
of #41549. I've attached an updated version of the patch.

Thanks,
Alek Storm

On 3/2/07, jn...@jnthn.net via RT <parrotbug...@parrotcode.org> wrote:
>
> On Sun Feb 25 20:10:00 2007, alek....@gmail.com wrote:

> > Now that 0.4.9 has been released, can this be committed?
> >

Alek Storm

unread,
Mar 15, 2007, 10:49:57 AM3/15/07
to parrotbug...@parrotcode.org
I'll be gone for a few days, so I'll fix it when I get back. It just looks
like object.ops changed since I submitted the patch.

On 3/15/07, Will Coleda via RT <parrotbug...@parrotcode.org> wrote:
>
> Can't apply this patch:
>
> $ patch -p0 < foo.patch
> patching file CREDITS
> Hunk #1 succeeded at 572 (offset 19 lines).
> patching file src/ops/object.ops
> Hunk #1 FAILED at 54.
> Hunk #2 FAILED at 92.
> Hunk #3 FAILED at 128.
> 3 out of 3 hunks FAILED -- saving rejects to file src/ops/object.ops.rej
> patching file src/pmc/parrotobject.pmc
> Hunk #1 succeeded at 164 (offset -38 lines).
>
> On Sun Mar 04 19:33:30 2007, alek....@gmail.com wrote:
> > Just kidding! Here's the patch, for real this time.


> >
> > On 3/4/07, Alek Storm <alek....@gmail.com> wrote:
> > > That's because the patch refers to a function that is now outdated
> > because
> > > of #41549. I've attached an updated version of the patch.
> > >
> > > Thanks,
> > > Alek Storm
> > >

> > > On 3/2/07, jn...@jnthn.net via RT <parrotbug-

jnthn@jnthn.net via RT

unread,
Mar 15, 2007, 7:11:58 PM3/15/07
to perl6-i...@perl.org
Hi,

This was wanted in the next release, so I applied the bits that weren't
applying with patch manually. Applied your tests as well. All checked in
as r17514.

Thanks!

Jonathan

0 new messages