I wrote: [snip]
I suppose trying to make '@' mean something different for signatures and for calls from C (as I have done) is a Bad Idea as long as the same code is used to parse the signatures in both cases. The easy solution is to choose a character other than '@' for one of the directions though I can't think of what might be most natural ('F' for flat?).
I've separated it into 'F' (flatten for call from C) and '@' for now. [snip]
The read-only variant generation currently does not handle NCI methods at all. There are number of implementation options; the best I can think of is to override findmethod (in the read-only type) to check for a property on the found method PMC that would indicates it writes (or vice-versa).
This is done (w/ s/findmethod/find_method/ of course), returning PMCNULL instead of a method that would write. (This prevents it from being called, but doesn't yield helpful errors.)
It also does not allow .pmc files to overide the default idea of whether a vtable method is read-only.
This remains unresolved though I'm not certain it should be allowed. The hard part of doing it correctly is handling inheritance.
A bigger issue for automatic read-only variant generation is that MMD methods currently don't do any read-onlyness detection. (Sorry!)
This is now fixed. [snip] -- Charles Reiss