At 9:38 AM -0800 1/15/03, Jonathan Sillito wrote:
I realize this will vary from language to language, but generally we will
need a PMC that encapsulates a method (and responds to the invoke vtable
method like Sub, or maybe the Sub PMC could do?). This python code is
interesting:

a = A()
a.f()    # output: A.f()
x = a.f  # get the method, a limited form of currying
x()      # output: A.f()
setattr(A, "f", g)  # replace A's f with g
a.f()    # output: g()
x()      # output (still): A.f()  !!!!!!!

Which shows that the dispatch (i.e. selecting which method to call) can
happen before the invocation.
Right, which argues for a method fetch. Which is cool, we need it, I'll make sure it gets in the list.

I've been arguing for things that will be generally of use to the compiler and interpreter though--things that will be useful for emitted code inferred from what the user's written, hence the confusion. The interpreter itself can't do that sort of explicit caching without a lot of infrastructure to support it.

Though, as I dig through the mail, I'm realizing more and more that we *must* do the explicit caching layer, and if we want to take full advantage of it we need to expose it to the compilers rather than keeping it secret, though it may be fairly inefficient to start with. Damn.
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk

Reply via email to