Re: Shortcut for obtaining a MethodHandle for an anonymous code fragment

2021-11-06 Thread Florian Weimer
* Vladimir Ivanov: >> Is it true that there is no shortcut for obtaining a method handle for >> some code fragment? >> >> That is, there is no way to write something like this? >> >>MethodHandle repeatIt = (String x) -> x + x; >> >> Instead it's necessary to give the expression a name and

Shortcut for obtaining a MethodHandle for an anonymous code fragment

2021-01-10 Thread Florian Weimer
Is it true that there is no shortcut for obtaining a method handle for some code fragment? That is, there is no way to write something like this? MethodHandle repeatIt = (String x) -> x + x; Instead it's necessary to give the expression a name and put it into a static method somewhere, and

Re: Defining anonymous classes

2014-08-17 Thread Florian Weimer
don't use the class loader which was used to define the class to look up the name? -- Florian Weimer / Red Hat Product Security ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Re: Defining anonymous classes

2014-08-15 Thread Florian Weimer
classes look very useful for run-time code generation. -- Florian Weimer / Red Hat Product Security ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Defining anonymous classes

2014-08-14 Thread Florian Weimer
construct of the same name. -- Florian Weimer / Red Hat Product Security ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Re: Latest experiments...happiness and sadness

2012-10-20 Thread Florian Weimer
* Remi Forax: Even a simple code like the one below, there is no scalar replacement (OSR or not), Float f = new Float(0); for(int i=0; ilength; i++) { f = new Float(f + 1.0f); } float result = f; System.out.println(result); Last time I looked at this,

Re: thinking about proper implementation of tail calls

2012-09-01 Thread Florian Weimer
* John Rose: As I recall, Doug Lea noted at the 2010 JVM Language Summit that tail calls would seem to allow work-stealing algorithms to be implemented somewhat more cleanly or efficiently. (How's that for tentative?) A worker thread goes from task to task in a data-driven way, similar to

Re: thinking about proper implementation of tail calls

2012-09-01 Thread Florian Weimer
* Remi Forax: I would be surprised if tail calls give more flexibility. Usually it's the opposite, the mini-interpreter wins in terms of flexibility: http://www.enyo.de/fw/notes/tail-calls.html This trick can work with a lexer because usually you don't keep states between each

Re: review request (L): 7030453: JSR 292 ClassValue.get method is too slow

2011-12-12 Thread Florian Weimer
and enumConstantDirectory seem good candidates (callers cache the value anyway or do additional work while accessing the field). -- Florian Weimerfwei...@bfk.de BFK edv-consulting GmbH http://www.bfk.de/ Kriegsstraße 100 tel: +49-721-96201-1 D-76133 Karlsruhe fax: +49