Looks good. I'm surprised some of those are still used. do_init_call, get_init_meth, Parrot_single_subclass, Parrot_class_lookup, and Parrot_class_lookup_p are all part of the old implementation. Oh, I see. Parrot_class_lookup and Parrot_class_lookup_p are only used by the deprecated getclass opcode. I suspect others may be similar. Parrot_single_subclass is only called by default.pmc and can't possibly work, because it tries to set attributes by number. Anything that references the PCD_* macros can't work any more. And some of the other functions are only called by those dead functions.

One additional change needed is to standardize the function names. I'd apply this patch, then come back and add "Parrot_oo_" to the beginning of each one (or change Parrot_blah to Parrot_oo_blah), and every place they're called. (Feel free to add extra sanity to the function names while you're at it. For example, "rebuild_attrib_stuff" is a good target for change.)

Thanks!
Allison

chromatic (via RT) wrote:
# New Ticket Created by chromatic # Please include the string: [perl #50002] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=50002 >


This large patch merges the necessary functions from src/objects.c into src/oo.c. The latter is the new PDD 15 file.

I've taken the liberty of removing unused code from src/objects.c, which gives a very nice:

$ diffstat objects.patch
MANIFEST | 2 config/gen/makefiles/root.in | 5 src/objects.c | 2536 -----------------------------------------
 src/oo.c                     | 1829 ++++++++++++++++++++++++++++++-
 4 files changed, 1828 insertions(+), 2544 deletions(-)

You need to reconfigure and rebuild after this so as not to include a latent src/objects.o file in your libparrot.

Because this patch is large and in charge, I'd like to hear some success reports from a couple of non-x86 and non-Linux platforms before I commit it.

-- c


Reply via email to