Allison Randal wrote:
Updating Punie went smoothly, but when I updated TGE::Rule:

-.sub __init :method
+.sub 'init' :method :anon :vtable

I got this error:

../../parrot -o TGE/Rule.pbc --output-pbc TGE/Rule.pir
error:imcc:'init' is not a v-table method, but was used with :vtable.

        in file 'TGE/Rule.pir' line 49
leo++ fixed half of this when he cleaned up the validation code, but there was another problem too. Fixed that in 15048, so this should work now.

Since it is so widely used, let's deprecate it two releases from now, so we can have one release with both options, and then deprecate it in the following release.
Sounds good.

This is a good place to start, but I agree it's not what we want ultimately. Chip and I talked about attaching a data structure of vtable entries as a property on the namespace object.
I implemented this to test it out and it kinda worked. However, properties don't get serialized so if you compile the program to a PBC and run that it doesn't work. Additionally, properties don't get inherited.

It'd be nice to actually attach these methods to a v-table itself somehow. However, unless we make classes a compile-time construct rather than "turning a namespace into a class" using newclass as we do now, I don't see how this can happen (at least, not cleanly). Maybe something to be addressed in the objects PDD.

Thanks,

Jonathan

Reply via email to