Why are interfaces so restrictive?
Jarrett Billingsley
kb3ctd2 at yahoo.com
Sat Mar 18 14:57:16 PST 2006
"BCS" <BCS_member at pathlink.com> wrote in message
news:dvhv4i$ip7$1 at digitaldaemon.com...
> In the case described, the interface has a context pointer that points to
> an
> object, in that object is a pointer to the stack frame of the function
> that is
> used to get the array. What I am proposing would be to have the interfaces
> context pointer point to the stack frame directly.
>
> (*(*Object.ptr).frame).array
>
> vs.
>
> (*frame).array
>
> The difference is much like the difference between a delegate made from a
> class
> method call and one from a nested function call.
>
> Yes, they look a lot alike, but one is a little bit more expensive.
"Nittering" and "nats" come to mind ;)
I would imagine that in any case, the compiler would optimize the access to
the stack frame, by dereferencing it once and keeping it in a register.
Seems more like a QOI issue to me. And kind of a rare, niche issue at that.
I mean, how often do you need to do this?
More information about the Digitalmars-d
mailing list