Dynamic Language Runtime: Difference between revisions

Content deleted Content added
Language implementations: reorder and rewrite both to separate the grouping of VB and JS/JScript and to give a clear introductory paragraph to this section + also eliminate outdated "as of" along the way
m clean up, typo(s) fixed: ically- → ically
Line 102:
|archive-url = https://web.archive.org/web/20090831184901/http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121
|url-status = dead
}}</ref> Fredrik Holmström later independently contributed a JavaScript implementation for the DLR which he dubbed "IronJS" in the naming tradition of IronPython and IronRuby.
 
Like [[C Sharp (programming language)|C#]], Visual Basic can access objects from dynamic languages built on the DLR such as [[IronPython]] and [[IronRuby]].<ref>{{cite web
Line 140:
| access-date = 2008-02-23}}</ref> The DLR [[Metadata (CLI)#Reflection|dynamically generates]] code corresponding to the functionality expressed by these nodes. The compiler for any dynamic language implemented on top of the DLR has to generate DLR abstract trees, and hand it over to the DLR libraries.
 
The DLR provides dynamically- updated <code>DynamicSite</code> objects that cache the task of binding methods to objects. Since the type of an object—as well as the members it contains—in dynamic languages can change during a program lifetime, a method invocation must check the method list to see if the invocation is a valid one. <code>DynamicSite</code> objects represent and cache the state of the object and its methods; any update to the object is reflected in the <code>DynamicSite</code> objects as well. DLR routes all method invocations via the <code>DynamicSite</code> objects, which then performs a fast lookup and [[name binding|binding]] of the method with the actual implementation.<ref>{{cite web | url = http://msdn2.microsoft.com/en-us/magazine/cc163344.aspx | title = CLR Inside Out: IronPython and the Dynamic Language Runtime | publisher = [[MSDN]] Magazine | author = Bill Chiles | date = October 2007 | access-date = 2007-08-10}}</ref>
 
In contrast to other efforts like the [[Parrot virtual machine]] (with no dependencies) or [[Da Vinci Machine]] (built on Java's [[JVM]] by adding new bytecodes in the [[Java bytecode|JVM instruction set]]), the DLR is built on top of the existing [[Common Language Runtime]], the [[.NET Framework]] virtual machine.<ref>{{cite web