World Library  
Flag as Inappropriate
Email this Article

Da Vinci Machine

Article Id: WHEBN0015630246
Reproduction Date:

Title: Da Vinci Machine  
Author: World Heritage Encyclopedia
Language: English
Subject: Parrot virtual machine, Java Community Process, HotSpot, JRuby, Da Vinci (disambiguation), Java version history, Scripting for the Java Platform, Java performance, Dynamic Language Runtime
Publisher: World Heritage Encyclopedia

Da Vinci Machine

Multi Language Virtual Machine
Developer(s) Sun Microsystems
Operating system Cross-platform
Type Library
License GPL+linking exception

The Da Vinci Machine, also called the Multi Language Virtual Machine is a Sun Microsystems project aiming to prototype the extension of the Java Virtual Machine to add support for dynamic languages.

It is already possible to run dynamic languages on top of the JVM, but the goal is to ease new dynamic language implementations and increase their performance. This project is the reference implementation of JSR 292 (Supporting Dynamically Typed Languages on the Java Platform).[1]


The Java Virtual Machine currently has no built-in support for dynamically typed languages:

JSR 292 (Supporting Dynamically Typed Languages on the Java Platform)[1] proposes to:

  • add a new invokedynamic instruction at the JVM level, to allow method invocation relying on dynamic type checking,[3]
  • to be able to change classes and methods at runtime dynamically in a production environment.

Following the success of the JRuby Java implementation, the Da Vinci project was started at the end of January 2008.[4] The capabilities experimented by Da Vinci are planned to be added to Java 7. It aims to prototype this JSR, but also other lower-priority extensions.[5] The first working prototype, developed as a patch on OpenJDK, was announced and made available on end of August 2008.[6][7][8]

Since then, the JRuby team has successfully wired dynamic invocation in their codebase. Dynamic invocation shipped with the 1.1.5 release, and will be disabled on JVMs without invokedynamic capabilities.[9]

Since then, part of the project has already been integrated in the upcoming JDK 7 codebase.[10] and integrated in the Java 7 release.


Dynamic invocation is built on the fact that, even if Java is a strongly static language at the language level, the type information is much less prevalent at the bytecode level.

However, dynamic languages implementations need to be able to use just-in-time compilation (rather than reflection) to achieve a good performance, and so to compile scripts to bytecode at runtime. To be allowed to be run by the Java Virtual Machine, these bytecodes must be verified prior to the execution, and the verifier check that the types are static throughout the code. It leads to these implementations having to create many different bytecodes for the different contexts of a method call, each time the signature of the arguments change.

This not only uses a lot of memory, but also fills a memory area called Permanent Generation, a part of the heap used by the JVM to store information about classes. Memory used in this area is never garbage collected because it stores immutable data in the context of Java programs; and because of that, dynamic languages implementations can only compile a small part of the scripts.[11]

JSR 292 proposes to:

  • provide a mechanism whereby an existing class can be loaded and modified, producing a new class with those modifications but sharing the rest of its structure and data, thus not filling the Permanent Generation space,
  • provide the new invokedynamic bytecode which allows the JVM to optimize these kind of calls.[3]

See also


External links

  • Da Vinci Machine project page
  • Sun presentation at Lang.NET Symposium
  • John Rose (project leader) blog
  • JSR 292 presentation paper
  • JSR 292 ACM 2010 presentation paper
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.