Monday, November 22, 2004

Dynamic Languages on the CLR – Part 1

 

Today I came across a paper written in 1996 at MIT that spoke of Dynamic Languages implementation on the JVM. The paper is an interesting read and pleasant because it isn’t dotted with arcane notational jing-bang and actually talks about real implementation issues.

 

The paper is written by Olin Shivers of MIT, interesting person – ha ha, actually this is the real link.

 

The first section address the issues of optimization of small scalar data types like integers which cannot actually afford to have dynamic lookup. The solution he proposes entails an assumption to be imposed on pointer types – so that small values can be held immediately rather than via indirection. For this purpose he recommends the addition of a type called an ImmediateDescriptor. I could not help smiling because this seems so much like a solved problem in the CLR of today – value types.

 

The second big issue that the paper brings is one of custom operations that a particular language may require that the runtime may not support. I don’t really have an answer for this. The paper goes onto compare this as being the inherent contradiction between RISC and CISC systems and adds the angle of safety of the end programming construct. This is by far a brilliant piece of thinking and these are the two suggestions primarily

1)       Build it up in API

2)       Enable the VM to have an extendable instruction set – similar to micrcodes in a processor

a.       Enable compilability of such new instructions by compiling to a lower level more RISC instruction set than the high level instruction set of the runtime…

 

I am hoping to offset this second part by not affording extensibility in the runtime and instead believing in some magical set of primitives. I don’t know about work that is actually being planned by the CLR team in this regard, I wonder what they are planning.

Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview