<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.jvmlangsummit.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Forax</id>
	<title>JVMLangSummit - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.jvmlangsummit.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Forax"/>
	<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=Special:Contributions/Forax"/>
	<updated>2026-10-11T23:35:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=R%C3%A9mi_Forax_(JDart)&amp;diff=875</id>
		<title>Rémi Forax (JDart)</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=R%C3%A9mi_Forax_(JDart)&amp;diff=875"/>
		<updated>2012-07-31T15:51:03Z</updated>

		<summary type="html">&lt;p&gt;Forax: Created page with &amp;quot;== Links == * slides: http://cr.openjdk.java.net/~forax/jvmsummit2012/jvmsummit12.pdf&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Links ==&lt;br /&gt;
* slides: http://cr.openjdk.java.net/~forax/jvmsummit2012/jvmsummit12.pdf&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=2012_Main_Page&amp;diff=874</id>
		<title>2012 Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=2012_Main_Page&amp;diff=874"/>
		<updated>2012-07-31T15:49:29Z</updated>

		<summary type="html">&lt;p&gt;Forax: /* Agenda */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Welcome to the wiki for the 2012 JVM Language Summit, taking place July 30-August 1, 2012, at the Oracle Santa Clara Campus.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://openjdk.java.net/projects/mlvm/jvmlangsummit JVM Language Summit] main page&lt;br /&gt;
* Email contacts: [mailto:brian.goetz-at-oracle.com Brian Goetz] and [mailto:john.r.rose-at-oracle.com John Rose]&lt;br /&gt;
* Archived wiki pages: [[2008_Main_Page | 2008]], [[2009_Main_Page | 2009]], [[2010_Main_Page | 2010]], [[2011_Main_Page | 2011]]&lt;br /&gt;
* [[Logistics]] page for travel tips and requests&lt;br /&gt;
* To gain write access, [[#Self-registration | see instructions below]].&lt;br /&gt;
&lt;br /&gt;
== Agenda ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!Monday, July 30&lt;br /&gt;
!Tuesday, July 31&lt;br /&gt;
!Wednesday, August 1&lt;br /&gt;
|-&lt;br /&gt;
| 8:20&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Breakfast&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Breakfast&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Breakfast&lt;br /&gt;
|-&lt;br /&gt;
| 8:40&lt;br /&gt;
|-&lt;br /&gt;
| 9:00&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
Georges Saab: Welcome from Oracle&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Jaba Batches: A Radical (And Better) New Approach to SQL, RMI, and WS Clients|William Cook (Batches)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[RTalk: a Smalltalk 'Live' Environment Built on the JVM|Mark Roos (RTalk)]]&lt;br /&gt;
|-&lt;br /&gt;
| 9:20&lt;br /&gt;
|-&lt;br /&gt;
| 9:40&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Lambda Expressions in Java|Brian Goetz (Lambda)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Patterns for Staged Compilation in Java|Matt Fowles (Staged compilation)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[invokedynamic Performance for Groovy|Jochen Theodorou (Groovy)]]&lt;br /&gt;
|-&lt;br /&gt;
| 10:00&lt;br /&gt;
|-&lt;br /&gt;
| 10:20&lt;br /&gt;
| style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Break&lt;br /&gt;
| style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Break&lt;br /&gt;
| style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Break&lt;br /&gt;
|-&lt;br /&gt;
| 10:40&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[MethodHandle Introspection: Internals|Dan Heidinga (MH introspection)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Truffle: A Self-Optimizing Runtime System|Thomas Wuerthinger (Truffle)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
John Rose (Arrays[2.0&amp;lt;sup&amp;gt;63&amp;lt;/sup&amp;gt;])&lt;br /&gt;
|-&lt;br /&gt;
| 11:00&lt;br /&gt;
|-&lt;br /&gt;
| 11:20&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Lambda Forms: IR for Method Handles|John Rose (Lambda Forms)]]&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; style=&amp;quot;background-color:#c6efce;&amp;quot; |&lt;br /&gt;
[[Truffle Workshop|Lukas Stadler (Truffle)]],&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Kawa|Per Bothner (Kawa)]]&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; style=&amp;quot;background-color:#c6efce;&amp;quot; |&lt;br /&gt;
[[Building a Dynamic Language on the JVM|Mark Roos (RTalk)]],&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Working with invokedynamic|Jochen Theodorou (invokedynamic)]]&lt;br /&gt;
|-&lt;br /&gt;
| 11:40&lt;br /&gt;
|-&lt;br /&gt;
| 12:00&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Lunch&lt;br /&gt;
|-&lt;br /&gt;
| 12:20&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Lunch&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Lunch&lt;br /&gt;
|-&lt;br /&gt;
| 12:40&lt;br /&gt;
|-&lt;br /&gt;
| 13:00&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[0xdata|Cliff Click (Big Data)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[7 Features the JVM Should Steal From the CLR|Jeroen Frijters (CLR/JVM)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Project Alchemy: Rebooting a Dynamic Image-based Language with a Large C Runtime|Duncan MacGregor (Migrating to JVM)]]&lt;br /&gt;
|-&lt;br /&gt;
| 13:20&lt;br /&gt;
|-&lt;br /&gt;
| 13:40&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Datomic|Rich Hickey (Datomic)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Embedding Fortress Types and Dispatch in the JVM|David Chase (Fortress)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Rémi Forax (JDart)]]&lt;br /&gt;
|-&lt;br /&gt;
| 14:00&lt;br /&gt;
|-&lt;br /&gt;
| 14:20&lt;br /&gt;
| style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Break&lt;br /&gt;
| style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Break&lt;br /&gt;
| style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Break&lt;br /&gt;
|-&lt;br /&gt;
| 14:40&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[The Mesh Language|Basil Hosmer (Mesh)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Multi-tenancy Programming Models|Ryan Sciampacone (Multi-tenant JVM)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Multi-language JDI? You're Joking, Right?|Jim Laskey (JDI)]]&lt;br /&gt;
|-&lt;br /&gt;
| 15:00&lt;br /&gt;
|-&lt;br /&gt;
| 15:20&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Graal (2012)|Doug Simon (Graal)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[Assembling for the JVM|Michael Wiedeking (AL1 JVM assembler)]]&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#ffeb9c;&amp;quot; |&lt;br /&gt;
[[A Friend in Need Is a Friend Indeed: Kotlin and Java|Andrey Breslav (Kotlin/Java interop)]]&lt;br /&gt;
|-&lt;br /&gt;
| 15:40&lt;br /&gt;
|-&lt;br /&gt;
| 16:00&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; style=&amp;quot;background-color:#c6efce;&amp;quot; |&lt;br /&gt;
[[Mesh Deeper Dive|Basil Hosmer (Mesh)]],&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Graal Compiler IR|Gilles Duboscq (Graal)]]&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; style=&amp;quot;background-color:#c6efce;&amp;quot; |&lt;br /&gt;
[[Java Collections Framework Design|Donald Raab (Collections)]],&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Design Discussion for Jaba Batches: A New Approach to SQL, RMI, and WS Clients|William Cook (Batches)]]&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; style=&amp;quot;background-color:#c6efce;&amp;quot; |&lt;br /&gt;
[[Building on ASM|Duncan MacGregor (ASM)]],&amp;lt;br/&amp;gt;&lt;br /&gt;
[[What Kotlin Doesn’t Do and Why|Andrey Breslav (Kotlin)]]&lt;br /&gt;
|-&lt;br /&gt;
| 16:20&lt;br /&gt;
|-&lt;br /&gt;
| 16:40&lt;br /&gt;
|-&lt;br /&gt;
| 17:00&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; |&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; |&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| 17:20&lt;br /&gt;
|-&lt;br /&gt;
| 17:40&lt;br /&gt;
|-&lt;br /&gt;
| 18:00&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; style=&amp;quot;background-color:#ffc7ce;&amp;quot; | Dinner&lt;br /&gt;
|-&lt;br /&gt;
| 18:20&lt;br /&gt;
|-&lt;br /&gt;
| 18:40&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Self-registration ==&lt;br /&gt;
&lt;br /&gt;
In order to upload slides or create and edit wiki pages, you need an account.&lt;br /&gt;
# Log in as user [[User:jvmlang|jvmlang]] and with a password which you should have received separately.&lt;br /&gt;
# Go to the [http://wiki.jvmlangsummit.com/index.php?title=Special:UserLogin&amp;amp;type=signup user creation page].  (If you have an OpenJDK or java.net user name, please reuse that here.)&lt;br /&gt;
# Log out, then back in using your new user name (note the tiny login link at the upper right).&lt;br /&gt;
&lt;br /&gt;
The initial jvmlang participant account does not have full write privileges; please use it only for self-registering.&lt;br /&gt;
&lt;br /&gt;
If you are having trouble recovering your password from last year, just re-register (e.g., ''jrose2'').&lt;br /&gt;
&lt;br /&gt;
Consult the [http://meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
== Bonus Discussions ==&lt;br /&gt;
&lt;br /&gt;
(add pages and/or workshop links here)&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=Why_Tailcalls&amp;diff=592</id>
		<title>Why Tailcalls</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=Why_Tailcalls&amp;diff=592"/>
		<updated>2010-07-29T16:27:07Z</updated>

		<summary type="html">&lt;p&gt;Forax: /* Reduce call stack size ! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are tailcalls fated to come in second place on every feature priority list?&lt;br /&gt;
&lt;br /&gt;
Let's gather the use cases and consider the implementation.&lt;br /&gt;
&lt;br /&gt;
(Note: This page is about &amp;quot;hard tail calls&amp;quot; as defined in the [http://blogs.sun.com/jrose/entry/tail_calls_in_the_vm Rose blog].  Soft TCO is already in many compilers, but does not have a strong effect on software architecture.)&lt;br /&gt;
&lt;br /&gt;
== use cases ==&lt;br /&gt;
=== multi-core task distribution ===&lt;br /&gt;
(Doug Lea) chaining task execution; without tail calls you blow the stack needlessly&lt;br /&gt;
&lt;br /&gt;
=== languages with guaranteed TCO ===&lt;br /&gt;
These are languages with functional patterns, including Scheme, Scala, F#. Seph also aims to give this guarantee.&lt;br /&gt;
&lt;br /&gt;
=== guaranteed disposal of stack-frame ===&lt;br /&gt;
Clojure needs workarounds to avoid floating garbage&lt;br /&gt;
  public static int count(Object o) {&lt;br /&gt;
    if (o instanceof Counted)&lt;br /&gt;
      return ((Counted) o).count();&lt;br /&gt;
    return countFrom(Util.ret1(o, o = null));&lt;br /&gt;
  }&lt;br /&gt;
  static public Object ret1(Object ret, Object nil) { return ret; }&lt;br /&gt;
&lt;br /&gt;
=== Reduce call stack size ! ===&lt;br /&gt;
(Rémi) Avoid to show language implementation internals by collapsing runtime stack frame.&lt;br /&gt;
&lt;br /&gt;
=== Kōan ===&lt;br /&gt;
Tail call... Booty call... More than a coincidence?  You decide.&lt;br /&gt;
&lt;br /&gt;
== external links ==&lt;br /&gt;
;Proposal: http://blogs.sun.com/jrose/entry/tail_calls_in_the_vm&lt;br /&gt;
;Thesis: http://www.ssw.uni-linz.ac.at/Research/Papers/Schwaighofer09Master/&lt;br /&gt;
;mlvm Wiki: http://wikis.sun.com/display/mlvm/TailCalls&lt;br /&gt;
;mlvm Code: http://hg.openjdk.java.net/mlvm/mlvm/hotspot/file/tip/tailc.patch&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=Why_Tailcalls&amp;diff=591</id>
		<title>Why Tailcalls</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=Why_Tailcalls&amp;diff=591"/>
		<updated>2010-07-29T16:26:31Z</updated>

		<summary type="html">&lt;p&gt;Forax: /* Reduce call stack size ! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are tailcalls fated to come in second place on every feature priority list?&lt;br /&gt;
&lt;br /&gt;
Let's gather the use cases and consider the implementation.&lt;br /&gt;
&lt;br /&gt;
(Note: This page is about &amp;quot;hard tail calls&amp;quot; as defined in the [http://blogs.sun.com/jrose/entry/tail_calls_in_the_vm Rose blog].  Soft TCO is already in many compilers, but does not have a strong effect on software architecture.)&lt;br /&gt;
&lt;br /&gt;
== use cases ==&lt;br /&gt;
=== multi-core task distribution ===&lt;br /&gt;
(Doug Lea) chaining task execution; without tail calls you blow the stack needlessly&lt;br /&gt;
&lt;br /&gt;
=== languages with guaranteed TCO ===&lt;br /&gt;
These are languages with functional patterns, including Scheme, Scala, F#. Seph also aims to give this guarantee.&lt;br /&gt;
&lt;br /&gt;
=== guaranteed disposal of stack-frame ===&lt;br /&gt;
Clojure needs workarounds to avoid floating garbage&lt;br /&gt;
  public static int count(Object o) {&lt;br /&gt;
    if (o instanceof Counted)&lt;br /&gt;
      return ((Counted) o).count();&lt;br /&gt;
    return countFrom(Util.ret1(o, o = null));&lt;br /&gt;
  }&lt;br /&gt;
  static public Object ret1(Object ret, Object nil) { return ret; }&lt;br /&gt;
&lt;br /&gt;
=== Reduce call stack size ! ===&lt;br /&gt;
(Rémi) Avoid to show language implementation internals by colapsing runtime stack frame.&lt;br /&gt;
&lt;br /&gt;
=== Kōan ===&lt;br /&gt;
Tail call... Booty call... More than a coincidence?  You decide.&lt;br /&gt;
&lt;br /&gt;
== external links ==&lt;br /&gt;
;Proposal: http://blogs.sun.com/jrose/entry/tail_calls_in_the_vm&lt;br /&gt;
;Thesis: http://www.ssw.uni-linz.ac.at/Research/Papers/Schwaighofer09Master/&lt;br /&gt;
;mlvm Wiki: http://wikis.sun.com/display/mlvm/TailCalls&lt;br /&gt;
;mlvm Code: http://hg.openjdk.java.net/mlvm/mlvm/hotspot/file/tip/tailc.patch&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=Why_Tailcalls&amp;diff=590</id>
		<title>Why Tailcalls</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=Why_Tailcalls&amp;diff=590"/>
		<updated>2010-07-29T16:26:11Z</updated>

		<summary type="html">&lt;p&gt;Forax: /* use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are tailcalls fated to come in second place on every feature priority list?&lt;br /&gt;
&lt;br /&gt;
Let's gather the use cases and consider the implementation.&lt;br /&gt;
&lt;br /&gt;
(Note: This page is about &amp;quot;hard tail calls&amp;quot; as defined in the [http://blogs.sun.com/jrose/entry/tail_calls_in_the_vm Rose blog].  Soft TCO is already in many compilers, but does not have a strong effect on software architecture.)&lt;br /&gt;
&lt;br /&gt;
== use cases ==&lt;br /&gt;
=== multi-core task distribution ===&lt;br /&gt;
(Doug Lea) chaining task execution; without tail calls you blow the stack needlessly&lt;br /&gt;
&lt;br /&gt;
=== languages with guaranteed TCO ===&lt;br /&gt;
These are languages with functional patterns, including Scheme, Scala, F#. Seph also aims to give this guarantee.&lt;br /&gt;
&lt;br /&gt;
=== guaranteed disposal of stack-frame ===&lt;br /&gt;
Clojure needs workarounds to avoid floating garbage&lt;br /&gt;
  public static int count(Object o) {&lt;br /&gt;
    if (o instanceof Counted)&lt;br /&gt;
      return ((Counted) o).count();&lt;br /&gt;
    return countFrom(Util.ret1(o, o = null));&lt;br /&gt;
  }&lt;br /&gt;
  static public Object ret1(Object ret, Object nil) { return ret; }&lt;br /&gt;
&lt;br /&gt;
=== Reduce call stack size ! ===&lt;br /&gt;
(Rémi) Avoid to show language implementation internals by colapsing runtime stack frame. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Kōan ===&lt;br /&gt;
Tail call... Booty call... More than a coincidence?  You decide.&lt;br /&gt;
&lt;br /&gt;
== external links ==&lt;br /&gt;
;Proposal: http://blogs.sun.com/jrose/entry/tail_calls_in_the_vm&lt;br /&gt;
;Thesis: http://www.ssw.uni-linz.ac.at/Research/Papers/Schwaighofer09Master/&lt;br /&gt;
;mlvm Wiki: http://wikis.sun.com/display/mlvm/TailCalls&lt;br /&gt;
;mlvm Code: http://hg.openjdk.java.net/mlvm/mlvm/hotspot/file/tip/tailc.patch&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=PHP.reboot:_a_post_JSR292_dynamic_language&amp;diff=562</id>
		<title>PHP.reboot: a post JSR292 dynamic language</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=PHP.reboot:_a_post_JSR292_dynamic_language&amp;diff=562"/>
		<updated>2010-07-28T18:55:28Z</updated>

		<summary type="html">&lt;p&gt;Forax: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;;Speaker: Rémi Forax&lt;br /&gt;
;Project: http://code.google.com/p/jvm-language-runtime/&lt;br /&gt;
&lt;br /&gt;
===Abstract===&lt;br /&gt;
&lt;br /&gt;
I will present my new pet project: PHP.reboot a safe and secure PHP like language that run on top of a 1.7 VM. After a short presentation of the language, I will explain its design and how this architecture a REPL interpreter, a runtime compiler with a loop optimizer and the foundation of Eclipse plugin, whole in one.&lt;br /&gt;
&lt;br /&gt;
http://wiki.jvmlangsummit.com/Image:Jvmsummit-phpreboot.pdf&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=File:Jvmsummit-phpreboot.pdf&amp;diff=561</id>
		<title>File:Jvmsummit-phpreboot.pdf</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=File:Jvmsummit-phpreboot.pdf&amp;diff=561"/>
		<updated>2010-07-28T18:54:52Z</updated>

		<summary type="html">&lt;p&gt;Forax: PHP.reboot a new language with a nice runtime compilation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP.reboot a new language with a nice runtime compilation&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=DinnerAtPiatti&amp;diff=423</id>
		<title>DinnerAtPiatti</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=DinnerAtPiatti&amp;diff=423"/>
		<updated>2009-09-26T14:07:16Z</updated>

		<summary type="html">&lt;p&gt;Forax: /* Constant Pool Constants */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Friday night after the Summit, some of us who hadn't had enough yet went across the street to Piatti for dinner.&lt;br /&gt;
&lt;br /&gt;
Emboldened by good food and drink, some of the JSR 292 EG members and others (Forax, Ohrstrom, Szegedi, Bini, Rose, ...) worked on some hard remaining issues.  Here are the napkins to prove it.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[Image:FridayDinnerNapkin1.jpg|160px|thumb|frameless]]&lt;br /&gt;
|[[Image:FridayDinnerNapkin2.jpg|160px|thumb|frameless]]&lt;br /&gt;
|[[Image:FridayDinnerNapkin3.jpg|160px|thumb|frameless]]&lt;br /&gt;
|[[Image:FridayDinnerNapkin4.jpg|160px|thumb|frameless]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== MethodHandle sub-kernel ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class MH {&lt;br /&gt;
  MT type()&lt;br /&gt;
  ? exactInvoke(?)&lt;br /&gt;
  ? genericInvoke(?)&lt;br /&gt;
  ? varargsInvoke(Object...)  // maybe? does a spread&lt;br /&gt;
&lt;br /&gt;
  MH convertArguments(MT)&lt;br /&gt;
  MH bind(x)&lt;br /&gt;
  MH spreadArguments()     // creates a spreader&lt;br /&gt;
  MH collectArguments(int n) // creates a fixed-arity collector&lt;br /&gt;
&lt;br /&gt;
  MH convertArgments(MT)&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;MH collectVarargs()&amp;quot; // maybe?  creates a variable-arity collector&lt;br /&gt;
&lt;br /&gt;
  toString() ??&lt;br /&gt;
  examine() ??&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rename &amp;lt;tt&amp;gt;MH.insertArgument&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;MH.bind&amp;lt;/tt&amp;gt; or (per Ola) &amp;lt;tt&amp;gt;MH.prependArgument&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Perhaps rename &amp;lt;tt&amp;gt;MH.convertArguments&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;MH.asType&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This is needed as a fundamental factory to create MHs of arbitrary exact types.&lt;br /&gt;
&lt;br /&gt;
==== What should toString return? ====&lt;br /&gt;
Simple answers:&lt;br /&gt;
* Implementation-dependent&lt;br /&gt;
* Object.toString&lt;br /&gt;
* Current RI:  The simple-name of the target method.  (For system-defined combinators, delegates to target.toString; user-defined ones also.)  Simple and useful.&lt;br /&gt;
&lt;br /&gt;
==== Completely Generic Argument Collection ====&lt;br /&gt;
As Fredrik has blogged, with genericInvoke we allow one method handle to accept any call type, as long as they have a certain given arity.  This allows us to glue together method handles without generating signature specific bytecodes.&lt;br /&gt;
&lt;br /&gt;
But it still requires (sometimes) arity-specific bytecodes; there are currently up to 256 different arities in the JVM.  This is close enough to the &amp;quot;infinite bytecode&amp;quot; requirement to be impractical.&lt;br /&gt;
&lt;br /&gt;
Possible Solution:  Allow a &amp;quot;varargs&amp;quot; method handle type, which can be generically invoked from any call site, of any signature, and (moreover) any arity.  It would be uniformly able to collect arguments from any call site.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Object foo(Object[] arglist)&lt;br /&gt;
  { ...do something complicated with arglist... }&lt;br /&gt;
  MH foo = #foo;&lt;br /&gt;
  foo.genericInvoke();    // WMT, arity&lt;br /&gt;
  foo.genericInvoke(1);   // CCE Integer != Object[]&lt;br /&gt;
  foo.genericInvoke(1,2); // WMT, arity&lt;br /&gt;
  MH bar = foo.collectVarargs();&lt;br /&gt;
  bar.genericInvoke();    // = foo.exactInvoke(new Object[]{})&lt;br /&gt;
  bar.genericInvoke(1);   // = foo.exactInvoke(new Object[]{1})&lt;br /&gt;
  bar.genericInvoke(1,2); // = foo.exactInvoke(new Object[]{1,2})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;MH.type&amp;lt;/tt&amp;gt; of such a MH would be some special value that would make it impossible to perform exact invocation.&lt;br /&gt;
&lt;br /&gt;
Spreading and collecting are of course interrelated:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!          !! spreading from av to mh(x,y) !! collecting from (x,y) to mh(av)&lt;br /&gt;
|-&lt;br /&gt;
| call     || mh.varargsInvoke(av)    || mh.exactInvoke(new Object[]{x,y})&lt;br /&gt;
|-&lt;br /&gt;
| adapt    || mh.spreadArgumments()   || mh.collectArguments(2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;tt&amp;gt;collectArguments&amp;lt;/tt&amp;gt; could be implemented by &amp;lt;tt&amp;gt;collectVarargs&amp;lt;/tt&amp;gt; plus &amp;lt;tt&amp;gt;asType&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Calling Sequences ====&lt;br /&gt;
&lt;br /&gt;
MH.genericInvoke does autoboxing.  Can result in an OOM error.  The JVM can make the adapter non-blocking, by preallocating all the boxing memory in advance (in thread-local buffer) before advancing into the call.  If the allocation fails, the call site is restarted after GC.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// virtual call through vtable:&lt;br /&gt;
mov [obj] -&amp;gt; ecx&lt;br /&gt;
call [ecx+off]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// mh call through vtable:&lt;br /&gt;
mov [obj] -&amp;gt; ecx&lt;br /&gt;
mov [obj+6] -&amp;gt; edx&lt;br /&gt;
call [ecx+edx]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// inexact call to DMH&lt;br /&gt;
// esi=this, edi/eax/edx=args&lt;br /&gt;
cmp [obj+8], #ExactMT&lt;br /&gt;
jmp/eq [...generic method entry...]&lt;br /&gt;
&lt;br /&gt;
GenericMethodEntry:&lt;br /&gt;
...adjust arguments, etc...&lt;br /&gt;
push ebp&lt;br /&gt;
call [...exact method entry...]&lt;br /&gt;
... adjust return value...&lt;br /&gt;
pop ebp&lt;br /&gt;
ret&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The adapter stub can be generated once per method.  Better to generate one per signature; need linkage register:&lt;br /&gt;
&amp;lt;pre&amp;gt;// generic method entry adapter, per-signature version&lt;br /&gt;
alias dest = r8  // linkage&lt;br /&gt;
mov dest &amp;lt;- #(...exact method entry...)&lt;br /&gt;
if (cs.type == mh.type)&lt;br /&gt;
  call [dest]&lt;br /&gt;
else&lt;br /&gt;
  call [dest-8]  // pushes call to r8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the need for special stack frames for adapting the return value.&lt;br /&gt;
&lt;br /&gt;
==== Java Method Handles ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Foo extends JavaMethodHandle {&lt;br /&gt;
  Foo() { super(#myInvoke); }&lt;br /&gt;
  void myInvoke() { ... }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Constant Pool Constants ====&lt;br /&gt;
Should be for MethodType and four kinds of MH:  virtual/interface, static, special.&lt;br /&gt;
&lt;br /&gt;
Idea:  Have the constant pool format for CONSTANT_MethodHandle_info be parameterized by (a) a member reference, and (b) a bytecode point (invokespecial, etc.).  Makes clear the correspondence between the symbolic reference and the semantics of the resulting method handle.  This also extends naturally to all other symbolic references:&lt;br /&gt;
* invokevirtual, CONSTANT_Methodref = findVirtual (must be class)&lt;br /&gt;
* invokeinterface, CONSTANT_InterfaceMethodref = findVirtual (must be interface)&lt;br /&gt;
* invokestatic, CONSTANT_Methodref = findStatic&lt;br /&gt;
* invokespecial, CONSTANT_Methodref = findSpecial&lt;br /&gt;
* getfield, CONSTANT_Fieldref = unreflectGetter (must be non-static)&lt;br /&gt;
* getstatic, CONSTANT_Fieldref = unreflectGetter (must be static)&lt;br /&gt;
* putfield, CONSTANT_Fieldref = unreflectSetter (must be non-static)&lt;br /&gt;
* putstatic, CONSTANT_Fieldref = unreflectSetter (must be static)&lt;br /&gt;
&lt;br /&gt;
CONSTANT_MethodHandle_info tag can be 15.&lt;br /&gt;
&lt;br /&gt;
For MethodType, I (Rémi) propose to add a new constant pool format CONSTANT_MethodType_info &lt;br /&gt;
CONSTANT_MethodType_info {&lt;br /&gt;
  u1 tag;                      &lt;br /&gt;
  u2 method_descriptor_index;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
tag&lt;br /&gt;
    The tag item of the CONSTANT_MethodType_info structure has the value CONSTANT_MethodType (14).&lt;br /&gt;
method_descriptor_index&lt;br /&gt;
    The value of the descriptor_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Utf8_info (§4.4.7) structure representing a valid method descriptor (§4.3.3).&lt;br /&gt;
&lt;br /&gt;
Also LDC instruction spec should be changed to allow CONSTANT_MethodHandle_info and CONSTANT_MethodType_info.&lt;br /&gt;
About the runtime semantics,&lt;br /&gt;
  LDC CONSTANT_MethodType_info == LDC CONSTANT_MethodType_info is required to return true&lt;br /&gt;
  if the constant values are equals.&lt;br /&gt;
  The same is not true with LDC CONSTANT_MethodHandle_info.&lt;br /&gt;
&lt;br /&gt;
Advantages to using constant pool:&lt;br /&gt;
* static checking, static analysis tools&lt;br /&gt;
* pre-linking, application-level early binding&lt;br /&gt;
* less need for user-managed cache variables (static final private MethodHandle FOO = ...)&lt;br /&gt;
&lt;br /&gt;
==== Exactly Typed Guards ====&lt;br /&gt;
(napkins #3, #4)&lt;br /&gt;
&lt;br /&gt;
Attila's MOP handles overload resolution.  This makes it unable to use plain invokevirtual calls (MHs.findVirtual) even as an optimization.  Reason:  A virtual method may be overlapped by another method which &amp;quot;steals&amp;quot; some of its argument types.  This could happen even with an &amp;quot;innocent looking&amp;quot; method like Object.equals.  For example, &amp;lt;tt&amp;gt;String.equals(String)&amp;lt;/tt&amp;gt; steals string arguments from &amp;lt;tt&amp;gt;String.equals(Object)&amp;lt;/tt&amp;gt;, when overloading is resolved.  It usually cannot be proved that this won't happen; see example below where &amp;lt;tt&amp;gt;Baz&amp;lt;/tt&amp;gt; calls &amp;lt;tt&amp;gt;Bar&amp;lt;/tt&amp;gt;, and later on &amp;lt;tt&amp;gt;Foo&amp;lt;/tt&amp;gt; is loaded to complicate the resolution of &amp;lt;tt&amp;gt;Bar.f&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
As a result, type guards for overloaded methods must use equality comparisons on classes, not the more &amp;quot;natural&amp;quot; instanceof.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Bar {&lt;br /&gt;
  int f(Object o) { ... }&lt;br /&gt;
  // f might also be Bar.equals inherited from Object&lt;br /&gt;
}&lt;br /&gt;
class Baz extends Bar {&lt;br /&gt;
  { invokedynamic f(String) -&amp;gt;&lt;br /&gt;
       guardWithTest({=&amp;gt; o.getClass == Bar.class}, Bar.#f, ...)&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
// later loaded:&lt;br /&gt;
class Foo extends Bar {&lt;br /&gt;
  int f(String s) { ... }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Problem:  Is there a way to register interest in class hierarchy changes, in such a way that the MOP could use virtual invocations, and &amp;quot;devirtualize&amp;quot; (like JVMs do) if a conflicting overloading is ever loaded?  The difficulty is defining a critical section during which (a) a new class is installed in the hierarchy, and (b) dependent call sites are reset, while (c) no calls are in progress.  It's the same critical section that JVMs (like Hotspot) use at a low level.  It should not allow execution of bytecodes.  It could, perhaps, associated invokedynamic sites with some given point in the type hierarchy, such that those points would be invalidated when new classes are loaded under that point.&lt;br /&gt;
&lt;br /&gt;
The problem gets a little more complex if argument or return types are replaced arbitrarily; for example &amp;lt;tt&amp;gt;int Foo.equals(boolean)&amp;lt;/tt&amp;gt; overriding &amp;lt;tt&amp;gt;boolean Object.equals(Object)&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Invalidation ====&lt;br /&gt;
Dynamic languages can reverse themselves:  The meaning of a call site can change over time due to changes in the runtime, especially in the application's type schema.&lt;br /&gt;
&lt;br /&gt;
Groovy currently gets a serious performance hit from polling a schema evolution counter on each method call.  This counter is volatile, to make sure it updates to every thread.  This is a typical &amp;quot;pull&amp;quot; or &amp;quot;polling&amp;quot; type of invalidation logic.&lt;br /&gt;
&lt;br /&gt;
JSR 292 will include &amp;quot;push&amp;quot; invalidation.&lt;br /&gt;
&lt;br /&gt;
Call site states, excluding invalidation:&lt;br /&gt;
* not yet executed&lt;br /&gt;
* executed, but bootstrap method not yet returned&lt;br /&gt;
* linked: reified as a unique call site (returned from BSM)&lt;br /&gt;
* relinked: &amp;lt;tt&amp;gt;CallSite.setTarget&amp;lt;/tt&amp;gt; can be called any number of times&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;tt&amp;gt;CS.setTarget&amp;lt;/tt&amp;gt; does not have volatile semantics.  Threads may take any amount of time to witness changes.  This is by design.&lt;br /&gt;
&lt;br /&gt;
Key question:  How do we (a) back up to a known state, (b) forcing all threads to see the change, (c) without race conditions, and (d) without per-call polling?  Answer: Collect call sites for invalidation, and bulk-invalidate at a well-defined safepoint.&lt;br /&gt;
&lt;br /&gt;
(Why bulk?  Because most implementations will be too slow for piecemeal work; need big transactions.)&lt;br /&gt;
&lt;br /&gt;
The JVM (at least, Hotspot) has subtle mechanisms for this, to perform revirtualization when a devirtualized call site becomes invalid, due to class loading (class schema change).  After some discussion, it was agreed that GCs in general require such global critical sections too.&lt;br /&gt;
&lt;br /&gt;
The answer we came up with is &amp;quot;full back-out at a safepoint&amp;quot;.  Details:&lt;br /&gt;
* The runtime (language or application) initiates any global transaction it wants&lt;br /&gt;
* The runtime marks the CallSite it wants to invalidated (and any other sites as well)&lt;br /&gt;
* The runtime requests bulk invalidation from the JVM&lt;br /&gt;
* The JVM invalidates the CallSite in a global critical section (&amp;quot;safepoint&amp;quot;)&lt;br /&gt;
* During this safepoint, every affected invokedynamic instruction is either blocked or has rolled forward&lt;br /&gt;
* The CallSite object is discarded (collectable by GC)&lt;br /&gt;
* The invokedynamic instruction is backed up to a &amp;quot;not yet executed&amp;quot; state&lt;br /&gt;
* As soon as the JVM returns, threads may execute the invokedynamic instruction, triggering its BSM&lt;br /&gt;
* The BSM interacts correctly with the runtime's current transaction&lt;br /&gt;
&lt;br /&gt;
Backing all the way out to an unlinked state is cleanest.  Alternative:  Back up to a &amp;quot;known initial target value&amp;quot; on the call site.  Seems to require messy bytecode execution in uncontrolled contexts, to compute and store the initial target value.&lt;br /&gt;
&lt;br /&gt;
Implications of full back-out:&lt;br /&gt;
* BSM can return the same call site as last time, if desired (''only if'' we supply an &amp;quot;is-live&amp;quot; query)&lt;br /&gt;
* gives a &amp;quot;hook&amp;quot; for changing the class and/or identity of a call site&lt;br /&gt;
* 1-to-many bytecode-to-CS relation meshes nicely with call site splitting (which Remy has rightly insisted on)&lt;br /&gt;
&lt;br /&gt;
This design allows threads to run invokedynamic instructions with complete concurrency except during specified global safepoints.&lt;br /&gt;
&lt;br /&gt;
Remaining problem:  Define what it means to &amp;quot;roll forward&amp;quot; through an invokedynamic call.  Should execute the whole call site target entry including pre-entry adapters, including argument boxing, etc.  Can define this w.r.t. the functions in MHs, but this adds a funny privilege to them. This could interact with tail-call guarantees.&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=DinnerAtPiatti&amp;diff=422</id>
		<title>DinnerAtPiatti</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=DinnerAtPiatti&amp;diff=422"/>
		<updated>2009-09-26T14:03:11Z</updated>

		<summary type="html">&lt;p&gt;Forax: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Friday night after the Summit, some of us who hadn't had enough yet went across the street to Piatti for dinner.&lt;br /&gt;
&lt;br /&gt;
Emboldened by good food and drink, some of the JSR 292 EG members and others (Forax, Ohrstrom, Szegedi, Bini, Rose, ...) worked on some hard remaining issues.  Here are the napkins to prove it.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[Image:FridayDinnerNapkin1.jpg|160px|thumb|frameless]]&lt;br /&gt;
|[[Image:FridayDinnerNapkin2.jpg|160px|thumb|frameless]]&lt;br /&gt;
|[[Image:FridayDinnerNapkin3.jpg|160px|thumb|frameless]]&lt;br /&gt;
|[[Image:FridayDinnerNapkin4.jpg|160px|thumb|frameless]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== MethodHandle sub-kernel ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class MH {&lt;br /&gt;
  MT type()&lt;br /&gt;
  ? exactInvoke(?)&lt;br /&gt;
  ? genericInvoke(?)&lt;br /&gt;
  ? varargsInvoke(Object...)  // maybe? does a spread&lt;br /&gt;
&lt;br /&gt;
  MH convertArguments(MT)&lt;br /&gt;
  MH bind(x)&lt;br /&gt;
  MH spreadArguments()     // creates a spreader&lt;br /&gt;
  MH collectArguments(int n) // creates a fixed-arity collector&lt;br /&gt;
&lt;br /&gt;
  MH convertArgments(MT)&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;MH collectVarargs()&amp;quot; // maybe?  creates a variable-arity collector&lt;br /&gt;
&lt;br /&gt;
  toString() ??&lt;br /&gt;
  examine() ??&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rename &amp;lt;tt&amp;gt;MH.insertArgument&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;MH.bind&amp;lt;/tt&amp;gt; or (per Ola) &amp;lt;tt&amp;gt;MH.prependArgument&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Perhaps rename &amp;lt;tt&amp;gt;MH.convertArguments&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;MH.asType&amp;lt;/tt&amp;gt;.&lt;br /&gt;
This is needed as a fundamental factory to create MHs of arbitrary exact types.&lt;br /&gt;
&lt;br /&gt;
==== What should toString return? ====&lt;br /&gt;
Simple answers:&lt;br /&gt;
* Implementation-dependent&lt;br /&gt;
* Object.toString&lt;br /&gt;
* Current RI:  The simple-name of the target method.  (For system-defined combinators, delegates to target.toString; user-defined ones also.)  Simple and useful.&lt;br /&gt;
&lt;br /&gt;
==== Completely Generic Argument Collection ====&lt;br /&gt;
As Fredrik has blogged, with genericInvoke we allow one method handle to accept any call type, as long as they have a certain given arity.  This allows us to glue together method handles without generating signature specific bytecodes.&lt;br /&gt;
&lt;br /&gt;
But it still requires (sometimes) arity-specific bytecodes; there are currently up to 256 different arities in the JVM.  This is close enough to the &amp;quot;infinite bytecode&amp;quot; requirement to be impractical.&lt;br /&gt;
&lt;br /&gt;
Possible Solution:  Allow a &amp;quot;varargs&amp;quot; method handle type, which can be generically invoked from any call site, of any signature, and (moreover) any arity.  It would be uniformly able to collect arguments from any call site.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Object foo(Object[] arglist)&lt;br /&gt;
  { ...do something complicated with arglist... }&lt;br /&gt;
  MH foo = #foo;&lt;br /&gt;
  foo.genericInvoke();    // WMT, arity&lt;br /&gt;
  foo.genericInvoke(1);   // CCE Integer != Object[]&lt;br /&gt;
  foo.genericInvoke(1,2); // WMT, arity&lt;br /&gt;
  MH bar = foo.collectVarargs();&lt;br /&gt;
  bar.genericInvoke();    // = foo.exactInvoke(new Object[]{})&lt;br /&gt;
  bar.genericInvoke(1);   // = foo.exactInvoke(new Object[]{1})&lt;br /&gt;
  bar.genericInvoke(1,2); // = foo.exactInvoke(new Object[]{1,2})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;MH.type&amp;lt;/tt&amp;gt; of such a MH would be some special value that would make it impossible to perform exact invocation.&lt;br /&gt;
&lt;br /&gt;
Spreading and collecting are of course interrelated:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!          !! spreading from av to mh(x,y) !! collecting from (x,y) to mh(av)&lt;br /&gt;
|-&lt;br /&gt;
| call     || mh.varargsInvoke(av)    || mh.exactInvoke(new Object[]{x,y})&lt;br /&gt;
|-&lt;br /&gt;
| adapt    || mh.spreadArgumments()   || mh.collectArguments(2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;tt&amp;gt;collectArguments&amp;lt;/tt&amp;gt; could be implemented by &amp;lt;tt&amp;gt;collectVarargs&amp;lt;/tt&amp;gt; plus &amp;lt;tt&amp;gt;asType&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Calling Sequences ====&lt;br /&gt;
&lt;br /&gt;
MH.genericInvoke does autoboxing.  Can result in an OOM error.  The JVM can make the adapter non-blocking, by preallocating all the boxing memory in advance (in thread-local buffer) before advancing into the call.  If the allocation fails, the call site is restarted after GC.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// virtual call through vtable:&lt;br /&gt;
mov [obj] -&amp;gt; ecx&lt;br /&gt;
call [ecx+off]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// mh call through vtable:&lt;br /&gt;
mov [obj] -&amp;gt; ecx&lt;br /&gt;
mov [obj+6] -&amp;gt; edx&lt;br /&gt;
call [ecx+edx]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// inexact call to DMH&lt;br /&gt;
// esi=this, edi/eax/edx=args&lt;br /&gt;
cmp [obj+8], #ExactMT&lt;br /&gt;
jmp/eq [...generic method entry...]&lt;br /&gt;
&lt;br /&gt;
GenericMethodEntry:&lt;br /&gt;
...adjust arguments, etc...&lt;br /&gt;
push ebp&lt;br /&gt;
call [...exact method entry...]&lt;br /&gt;
... adjust return value...&lt;br /&gt;
pop ebp&lt;br /&gt;
ret&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The adapter stub can be generated once per method.  Better to generate one per signature; need linkage register:&lt;br /&gt;
&amp;lt;pre&amp;gt;// generic method entry adapter, per-signature version&lt;br /&gt;
alias dest = r8  // linkage&lt;br /&gt;
mov dest &amp;lt;- #(...exact method entry...)&lt;br /&gt;
if (cs.type == mh.type)&lt;br /&gt;
  call [dest]&lt;br /&gt;
else&lt;br /&gt;
  call [dest-8]  // pushes call to r8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the need for special stack frames for adapting the return value.&lt;br /&gt;
&lt;br /&gt;
==== Java Method Handles ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Foo extends JavaMethodHandle {&lt;br /&gt;
  Foo() { super(#myInvoke); }&lt;br /&gt;
  void myInvoke() { ... }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Constant Pool Constants ====&lt;br /&gt;
Should be for MethodType and four kinds of MH:  virtual/interface, static, special.&lt;br /&gt;
&lt;br /&gt;
Idea:  Have the constant pool format for CONSTANT_MethodHandle_info be parameterized by (a) a member reference, and (b) a bytecode point (invokespecial, etc.).  Makes clear the correspondence between the symbolic reference and the semantics of the resulting method handle.  This also extends naturally to all other symbolic references:&lt;br /&gt;
* invokevirtual, CONSTANT_Methodref = findVirtual (must be class)&lt;br /&gt;
* invokeinterface, CONSTANT_InterfaceMethodref = findVirtual (must be interface)&lt;br /&gt;
* invokestatic, CONSTANT_Methodref = findStatic&lt;br /&gt;
* invokespecial, CONSTANT_Methodref = findSpecial&lt;br /&gt;
* getfield, CONSTANT_Fieldref = unreflectGetter (must be non-static)&lt;br /&gt;
* getstatic, CONSTANT_Fieldref = unreflectGetter (must be static)&lt;br /&gt;
* putfield, CONSTANT_Fieldref = unreflectSetter (must be non-static)&lt;br /&gt;
* putstatic, CONSTANT_Fieldref = unreflectSetter (must be static)&lt;br /&gt;
&lt;br /&gt;
CONSTANT_MethodHandle_info tag can be 15.&lt;br /&gt;
&lt;br /&gt;
For MethodType, I (Rémi) propose to add a new constant pool format CONSTANT_MethodType_info &lt;br /&gt;
CONSTANT_MethodType_info {&lt;br /&gt;
  u1 tag;                      &lt;br /&gt;
  u2 method_descriptor_index;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
tag&lt;br /&gt;
    The tag item of the CONSTANT_MethodType_info structure has the value CONSTANT_MethodType (14).&lt;br /&gt;
method_descriptor_index&lt;br /&gt;
    The value of the descriptor_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Utf8_info (§4.4.7) structure representing a valid method descriptor (§4.3.3).&lt;br /&gt;
&lt;br /&gt;
Also LDC instruction spec should be changed to allow CONSTANT_MethodHandle_info and CONSTANT_MethodType_info.&lt;br /&gt;
&lt;br /&gt;
Advantages to using constant pool:&lt;br /&gt;
* static checking, static analysis tools&lt;br /&gt;
* pre-linking, application-level early binding&lt;br /&gt;
* less need for user-managed cache variables (static final private MethodHandle FOO = ...)&lt;br /&gt;
&lt;br /&gt;
==== Exactly Typed Guards ====&lt;br /&gt;
(napkins #3, #4)&lt;br /&gt;
&lt;br /&gt;
Attila's MOP handles overload resolution.  This makes it unable to use plain invokevirtual calls (MHs.findVirtual) even as an optimization.  Reason:  A virtual method may be overlapped by another method which &amp;quot;steals&amp;quot; some of its argument types.  This could happen even with an &amp;quot;innocent looking&amp;quot; method like Object.equals.  For example, &amp;lt;tt&amp;gt;String.equals(String)&amp;lt;/tt&amp;gt; steals string arguments from &amp;lt;tt&amp;gt;String.equals(Object)&amp;lt;/tt&amp;gt;, when overloading is resolved.  It usually cannot be proved that this won't happen; see example below where &amp;lt;tt&amp;gt;Baz&amp;lt;/tt&amp;gt; calls &amp;lt;tt&amp;gt;Bar&amp;lt;/tt&amp;gt;, and later on &amp;lt;tt&amp;gt;Foo&amp;lt;/tt&amp;gt; is loaded to complicate the resolution of &amp;lt;tt&amp;gt;Bar.f&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
As a result, type guards for overloaded methods must use equality comparisons on classes, not the more &amp;quot;natural&amp;quot; instanceof.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Bar {&lt;br /&gt;
  int f(Object o) { ... }&lt;br /&gt;
  // f might also be Bar.equals inherited from Object&lt;br /&gt;
}&lt;br /&gt;
class Baz extends Bar {&lt;br /&gt;
  { invokedynamic f(String) -&amp;gt;&lt;br /&gt;
       guardWithTest({=&amp;gt; o.getClass == Bar.class}, Bar.#f, ...)&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
// later loaded:&lt;br /&gt;
class Foo extends Bar {&lt;br /&gt;
  int f(String s) { ... }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Problem:  Is there a way to register interest in class hierarchy changes, in such a way that the MOP could use virtual invocations, and &amp;quot;devirtualize&amp;quot; (like JVMs do) if a conflicting overloading is ever loaded?  The difficulty is defining a critical section during which (a) a new class is installed in the hierarchy, and (b) dependent call sites are reset, while (c) no calls are in progress.  It's the same critical section that JVMs (like Hotspot) use at a low level.  It should not allow execution of bytecodes.  It could, perhaps, associated invokedynamic sites with some given point in the type hierarchy, such that those points would be invalidated when new classes are loaded under that point.&lt;br /&gt;
&lt;br /&gt;
The problem gets a little more complex if argument or return types are replaced arbitrarily; for example &amp;lt;tt&amp;gt;int Foo.equals(boolean)&amp;lt;/tt&amp;gt; overriding &amp;lt;tt&amp;gt;boolean Object.equals(Object)&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Invalidation ====&lt;br /&gt;
Dynamic languages can reverse themselves:  The meaning of a call site can change over time due to changes in the runtime, especially in the application's type schema.&lt;br /&gt;
&lt;br /&gt;
Groovy currently gets a serious performance hit from polling a schema evolution counter on each method call.  This counter is volatile, to make sure it updates to every thread.  This is a typical &amp;quot;pull&amp;quot; or &amp;quot;polling&amp;quot; type of invalidation logic.&lt;br /&gt;
&lt;br /&gt;
JSR 292 will include &amp;quot;push&amp;quot; invalidation.&lt;br /&gt;
&lt;br /&gt;
Call site states, excluding invalidation:&lt;br /&gt;
* not yet executed&lt;br /&gt;
* executed, but bootstrap method not yet returned&lt;br /&gt;
* linked: reified as a unique call site (returned from BSM)&lt;br /&gt;
* relinked: &amp;lt;tt&amp;gt;CallSite.setTarget&amp;lt;/tt&amp;gt; can be called any number of times&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;tt&amp;gt;CS.setTarget&amp;lt;/tt&amp;gt; does not have volatile semantics.  Threads may take any amount of time to witness changes.  This is by design.&lt;br /&gt;
&lt;br /&gt;
Key question:  How do we (a) back up to a known state, (b) forcing all threads to see the change, (c) without race conditions, and (d) without per-call polling?  Answer: Collect call sites for invalidation, and bulk-invalidate at a well-defined safepoint.&lt;br /&gt;
&lt;br /&gt;
(Why bulk?  Because most implementations will be too slow for piecemeal work; need big transactions.)&lt;br /&gt;
&lt;br /&gt;
The JVM (at least, Hotspot) has subtle mechanisms for this, to perform revirtualization when a devirtualized call site becomes invalid, due to class loading (class schema change).  After some discussion, it was agreed that GCs in general require such global critical sections too.&lt;br /&gt;
&lt;br /&gt;
The answer we came up with is &amp;quot;full back-out at a safepoint&amp;quot;.  Details:&lt;br /&gt;
* The runtime (language or application) initiates any global transaction it wants&lt;br /&gt;
* The runtime marks the CallSite it wants to invalidated (and any other sites as well)&lt;br /&gt;
* The runtime requests bulk invalidation from the JVM&lt;br /&gt;
* The JVM invalidates the CallSite in a global critical section (&amp;quot;safepoint&amp;quot;)&lt;br /&gt;
* During this safepoint, every affected invokedynamic instruction is either blocked or has rolled forward&lt;br /&gt;
* The CallSite object is discarded (collectable by GC)&lt;br /&gt;
* The invokedynamic instruction is backed up to a &amp;quot;not yet executed&amp;quot; state&lt;br /&gt;
* As soon as the JVM returns, threads may execute the invokedynamic instruction, triggering its BSM&lt;br /&gt;
* The BSM interacts correctly with the runtime's current transaction&lt;br /&gt;
&lt;br /&gt;
Backing all the way out to an unlinked state is cleanest.  Alternative:  Back up to a &amp;quot;known initial target value&amp;quot; on the call site.  Seems to require messy bytecode execution in uncontrolled contexts, to compute and store the initial target value.&lt;br /&gt;
&lt;br /&gt;
Implications of full back-out:&lt;br /&gt;
* BSM can return the same call site as last time, if desired (''only if'' we supply an &amp;quot;is-live&amp;quot; query)&lt;br /&gt;
* gives a &amp;quot;hook&amp;quot; for changing the class and/or identity of a call site&lt;br /&gt;
* 1-to-many bytecode-to-CS relation meshes nicely with call site splitting (which Remy has rightly insisted on)&lt;br /&gt;
&lt;br /&gt;
This design allows threads to run invokedynamic instructions with complete concurrency except during specified global safepoints.&lt;br /&gt;
&lt;br /&gt;
Remaining problem:  Define what it means to &amp;quot;roll forward&amp;quot; through an invokedynamic call.  Should execute the whole call site target entry including pre-entry adapters, including argument boxing, etc.  Can define this w.r.t. the functions in MHs, but this adds a funny privilege to them. This could interact with tail-call guarantees.&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=JSR292Backport&amp;diff=120</id>
		<title>JSR292Backport</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=JSR292Backport&amp;diff=120"/>
		<updated>2008-09-25T23:50:59Z</updated>

		<summary type="html">&lt;p&gt;Forax: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== invokedynamic backport + VM,anonymous classes ==&lt;br /&gt;
Rémi Forax &lt;br /&gt;
&lt;br /&gt;
; Project: http://code.google.com/p/jvm-language-runtime/&lt;br /&gt;
&lt;br /&gt;
In order to fasten adoption of JSR292, this is a project to provide a backport of JSR292 that will work, with Java 5 or Java 6.&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
; Talk Abstract: invokedynamic-backport:&amp;lt;br/&amp;gt;- why, how-to&amp;lt;br/&amp;gt;- at runtime/at compile time, weaver/agent&amp;lt;br/&amp;gt;- features/missing features/ roadmap&amp;lt;br/&amp;gt;- JSR292 API vs backport API&amp;lt;br/&amp;gt;- invokedynamic&amp;lt;br/&amp;gt;- method handles/guards/adapter handle&amp;lt;br/&amp;gt;- linkage/call sites invalidation&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Proposed API for anonymous classes in the VM:&amp;lt;br/&amp;gt;- Uses cases&amp;lt;br/&amp;gt;- Proposed API&amp;lt;br/&amp;gt;- Using patched classes&amp;lt;br/&amp;gt;- implementing Java inner class with VM anonymous class&lt;br /&gt;
&lt;br /&gt;
This presentation first presents the API allowing to create anonymous class in the VM and do some constant pool patching. &lt;br /&gt;
Then I will show some the corner cases of the current JSR292 in regards to the backport&lt;br /&gt;
&lt;br /&gt;
http://wiki.jvmlangsummit.com/pdf/JSR292Backport&lt;br /&gt;
&lt;br /&gt;
; Speaker Notes: Two light talks (30min+10min) about the invokedynamic backport: a JSR 292 implementation compatible with jdk 1.5 available at http://code.google.com/p/jvm-language-runtime/ and a proposed Java side API to VM anonymouses class.&lt;br /&gt;
&lt;br /&gt;
=== Author Bio ===&lt;br /&gt;
* &amp;lt;insert bio here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Key Issues for Discussion (cooperative) ===&lt;br /&gt;
''(please expand cooperatively)''&lt;br /&gt;
[[Talk:InvokeDynamic]]&lt;br /&gt;
&lt;br /&gt;
== PDF ==&lt;br /&gt;
[[Image:Jsr292-backport.pdf]]&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=JSR292Backport&amp;diff=72</id>
		<title>JSR292Backport</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=JSR292Backport&amp;diff=72"/>
		<updated>2008-09-25T16:19:30Z</updated>

		<summary type="html">&lt;p&gt;Forax: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Abstract ==&lt;br /&gt;
In order to fasten adoption of JSR292,&lt;br /&gt;
a project is to provide a backport of JSR292 that&lt;br /&gt;
will work, with Java 5 or Java 6.&lt;br /&gt;
&lt;br /&gt;
This presentation first presents&lt;br /&gt;
the API allowing to create anonymous class in the VM&lt;br /&gt;
and do some constant pool patching. &lt;br /&gt;
Then i will show some the corner cases of the&lt;br /&gt;
current JSR292 in regards to the backport &lt;br /&gt;
&lt;br /&gt;
== PDF ==&lt;br /&gt;
[[Image:Jsr292-backport.pdf]]&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=JSR292Backport&amp;diff=71</id>
		<title>JSR292Backport</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=JSR292Backport&amp;diff=71"/>
		<updated>2008-09-25T16:19:03Z</updated>

		<summary type="html">&lt;p&gt;Forax: JSR292 backport&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Abstract ==&lt;br /&gt;
In order to fasten adoption of JSR292,&lt;br /&gt;
a project is to provide a backport of JSR292 that&lt;br /&gt;
will work, with Java 5 or Java 6.&lt;br /&gt;
&lt;br /&gt;
This presentation first presents&lt;br /&gt;
the API allowing to create anonymous class in the VM&lt;br /&gt;
and do some constant pool patching. &lt;br /&gt;
Then i will show some the corner cases of the&lt;br /&gt;
current JSR292 in regards to the backport &lt;br /&gt;
&lt;br /&gt;
[[Image:Jsr292-backport.pdf]]&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.jvmlangsummit.com/index.php?title=File:Jsr292-backport.pdf&amp;diff=70</id>
		<title>File:Jsr292-backport.pdf</title>
		<link rel="alternate" type="text/html" href="https://wiki.jvmlangsummit.com/index.php?title=File:Jsr292-backport.pdf&amp;diff=70"/>
		<updated>2008-09-25T16:09:15Z</updated>

		<summary type="html">&lt;p&gt;Forax: jsr 292 backport presentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;jsr 292 backport presentation&lt;/div&gt;</summary>
		<author><name>Forax</name></author>
		
	</entry>
</feed>