domingo, 30 de octubre de 2016

[Discussion] Technical Overview of the Common Language Runtime

Hello, this time I would like to discuss a paper written by Erik Meijer and Jim Miller, Microsoft employee’s whose work is related to the Common Language Runtime. The paper is called Technical Overview of the Common Language Runtime and it can be found here.

The main topic of the paper is about the Microsoft’s Common Language Infrastructure (CLI), it explains the componentes of the CLI and the authors make superficial comparisons with the Java Virtual Machine.

Personally I don’t know much about virtual machines but it looks like the CLI has a lot of features that the JVM doesn’t have. For example that it could be used as a runtime for many kinds of programming language paradigms unlike the JVM that only suppots statically typed and object-oriented languages.

The CLI has a lot of primitive types which makes it powerful and very flexible. There are a lot of instructions available to modify and manage the evaluation and argument stack. You can do arithmentic operations, reference alterations to build for example a swap function, reference types and also value types. Something interesting is that it is mentioned in the article that one important feature is the tailcall function in order to support languages that only have recursion as a method for looping. Here it is said that this feature is not supported by the JVM but it makes me wonder about Clojure. A strong looping method in Clojure is the loop/recur functions and as far as I know it supported tailcalls so why in the article is said that it doesn’t support such feature. Maybe I’m wrong about this assumption about Clojure or maybe the JVM got updated in the last couple of years, but I would like to know.

Something that got my attention was all the stack behaviour and the operations done under it. I think that we will discuss more about it in the following classes of the Compiler Design course so we can implement the last phase of our compiler: code generation, which sounds very exciting.

References

http://webcem01.cem.itesm.mx:8005/s201613/tc3048/clr.pdf

0 comentarios:

Publicar un comentario