Ticket #1165 (new RFC)
need ability to dispatch to parent's method or vtable from PIR
Reported by: | coke | Owned by: | allison |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | none | Version: | |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: |
Description
If you write a class in PIR, you can access certain ancestral methods/vtables by getting the 'proxy' attribute for that ancestor, with two big limitations.
you need to know the name of the ancestor that implements the vtable (this isn't always your direct parent.)
that ancestor MUST be a PMC (not another class.)
Since there is no generic mechanism to invoke a vtable by name, we should probably continue to use a proxy object to access this functionality.
perhaps:
# INT values only! .sub set_pmc_keyed :vtable .param pmc key .param pmc value $I0 = value .local pmc proxy proxy = get_proxy self proxy[key] = $I0 .end
Bikeshed away. Tcl needs this or something like it to fully implement the trace builtin. (which basically lets us run code before and after each vtable access.)