Review request for JDK-8025435

Marcus Lagergren marcus.lagergren at
Wed Sep 24 12:31:40 UTC 2014

OK, new webrev addressing Attila’s comments and Sundar’s and Hannes’s offline comments as well is up at :

I’ve now moved, as suggested, all abstraction about various optimistic strategies into the native objects themselves, which indeed cleaned stuff up nicely. The result is shorter overall codemass. The problem with primitives and optimistic builtins was present in the old branch itself, only it did not manifest itself.

Test is clean. Leaving to pick up the kids now, and will run test262 and octane when I am home with the goal of checking that everything is correct and verifying my octane performance improvements on a dedicated benchmarking machine.


On 23 Sep 2014, at 17:36, Marcus Lagergren <marcus.lagergren at> wrote:

> Guys, guys! This is my review thread for JDK-8025435. Start another one for this, please…
> /M
> On 23 Sep 2014, at 17:29, Aleksey Shipilev <aleksey.shipilev at> wrote:
>> On 09/23/2014 05:58 PM, Thomas Wuerthinger wrote:
>>> I understood your remark. I just believe that this restriction is not
>>> fundamental to JMH and there *could* be support for languages that do
>>> not statically compile to Java bytecodes as well.
>> I think this thread side-tracks.
>> Bottom-line: There are only two ways to hook up dynamically-compiled
>> language runtime into JMH (say, JS engine), depending who is in control:
>> a) Ask JS engine to start executing the JS benchmark, *and* call back
>> into JMH with an AST/bytecode/whatever in hands, asking to measure it.
>> We would need to generate the synthetic Java code, compile it, load it,
>> and only then run it, calling back to JS runtime for execution of our
>> payload -- all in flight, and requiring the tight cohesion.
>> b) Ask JMH to compile and execute a Java benchmark, and call into JS
>> engine with a JS script in hands, asking to compile and run it. There,
>> users statically compile the benchmark JAR, and it runs with minimal
>> dynamic dances, also going through the standard APIs (javax.script).
>> While there is nothing fundamental preventing us from exploring the
>> route (a), it is not as practical as going the well-established route
>> (b). In other words, "could be done" != "should be done".
>> -Aleksey.

More information about the nashorn-dev mailing list