|
|
|
|
How Silverlight supports dynamic languages
|
I am not at this conference, but anyway...
What I was wondering is how Silverlight does support these super-cool dynamic languages 'on-the-fly'. After some fiddling, this is what I think how it works:
- 'Non-real' CLR languages like IronPython or IronRuby have a parser which converts the source code to a language-specific abstract syntax tree (AST).
- The language specific AST is transformed to a language-independent dynamic language runtime (DLR) AST.
- DLR's code generation converts the DLR AST to IL code using Reflection.Emit (and Light-Weight Code Generation [LCG]). A delegate is created pointing to the new DynamicMethod.
- The delegate is finally invoked.
Can anybody confirm this?
|
© 2002 - 2009 by thinktecture, Ingo Rammer and Christian Weyer. All rights reserved.

|
|