Hardwired polymorphism

Could you assist me in finding a previous discussion related to "hardwired" polymorphism, in which instead of relying on runtime information such as a class tag the dispatch uses a separate version of the function for each possible type. I imagine that could be implemented using C++ templates but I forgot the details.

The issue was of course the explosion of function signatures, but that is probably bound by the amount of interdependence between classes. If I remember correctly a concrete application is for programming embedded systems.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Method Specialization?

It sounds like you're talking about "Method Specialization". This is one of the techniques developed for the Self system and now used in Java's JIT compiler.
Self/Java avoid the explosion of function signatures by performing the specialization at run-time on only those methods which are invoked a lot (ie. hot-spots).

From:

http://portal.acm.org/citation.cfm?id=74831

Our system compiles several copies of a given procedure, each customized for one receiver type, so that the type of the receiver is bound at compile time.

Thanks, it is indeed

Thanks, it is indeed method specialisation. The link requires a subscription though.

Self Docs

You can search there :
http://research.sun.com/self/
there are plenty of papers on the Self technology, including Craig Chamber's thesis on the Self compiler :
http://research.sun.com/self/papers/craig-thesis.html

Good idea

Good idea to redirect me to the Self docs, it is totally relevant to the work on my language. I should have taken the clue earlier as it will definitely help me. I suppose the talk about specialisation is in the compiler paper?

Psyco

Psyco may be of interest too: it's a specialising compiler for python. The website has links to a few papers as well as the source code.