<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi,<div class=""><br class=""></div><div class="">I’ve tested the latest graalvm release and I’m still getting an exception due to&nbsp;lossy conversion.</div><div class=""><br class=""></div><div class="">Actually I have a JS var that contains a String but is an int and the Java method call is int. I know that graaljs is restrictive here but can’t you just act like Nashorn when in Nashorn compatibility mode?</div><div class=""><br class=""></div><div class="">I mean I know that I pass a String containing an int so I am responsible for that. Actually I don’t need this graaljs “feature” at all. ;-)</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Andreas</div><div class=""><br class=""></div><div class="">--&nbsp;<br class="">Andreas Mueller<br class="">IIT Software GmbH<br class=""><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.swiftmq.com&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=W_toQEy14pwinecbpvvrWXzy7dZdTSFWdDyPd78B9nc&s=1qMXQ0PKfshy7NwG06_pQodqt5cDgO0HDMOisuYK7-c&e=" class="">http://www.swiftmq.com</a><br class=""><br class=""><img height="100" width="452" apple-inline="yes" id="5840637D-E270-4E63-83C2-CA19559F2FFE" apple-width="yes" apple-height="yes" src="cid:D8D52512-246D-49DF-A1D7-CA2813FBD86A@multi.box" class=""><br class=""><br class=""></div><div class=""><br class=""><blockquote type="cite" class="">On 22 Jun 2018, at 20:34, Andreas Mueller &lt;<a href="mailto:am@iit.de" class="">am@iit.de</a>&gt; wrote:<br class=""><br class="">Hi Christian,<br class=""><br class=""><blockquote type="cite" class="">Did you try if it worked if you annotated it? Or is your code (or relevant parts of it) open-source so we can run it ourselves?<br class=""></blockquote><br class="">I didn’t test it yet. It’s not open source either (the scripts are under Apache 2 but the SwiftMQ is not).&nbsp;<br class=""><br class="">The scripts are using a SwiftMQ Stream Interface (the Java part provided by SwiftMQ). The intention is to use any JSR 223 available scripting engine so that scripts (SwiftMQ&nbsp;Steeams) can be written in JS, Groovy, Scala, Python etc. We have only tested (and implemented it) in JS. So I can add annotattions but would rather appreciated if you don’t&nbsp;require them at all.<br class=""><br class="">Javadoc of the Stream Interface, FYI (sometimes we just use a Runnable as the callback interface):<br class=""><br class=""><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.swiftmq.com_products_router_swiftlets_sys-5Fstreams_si_javadoc_index.html&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=W_toQEy14pwinecbpvvrWXzy7dZdTSFWdDyPd78B9nc&s=-V-rGcmg6GMkecWIzgo18inQxsM3KetdwkUqoeKfnro&e=" class="">http://www.swiftmq.com/products/router/swiftlets/sys_streams/si/javadoc/index.html</a><br class=""><br class=""><br class=""><blockquote type="cite" class="">&gt; What we need is in fact a Nashorn replacement as a scripting engine as part of the JDK<br class="">&gt; or as a plugin into the JDK by adding it to the classpath.<br class=""><br class="">Executing Graal JavaScript on a stock JDK is possible already (without Graal as optimizing compiler), and we are working on a fully-performant solution for JDK 11 (with&nbsp;Graal). Graal JavaScript tries to be closely compatible to Nashorn, but it is unrealistic that it ever provides 100% compatibility. Feedback like yours helps us understand what&nbsp;users care about most.<br class=""></blockquote><br class="">We have a lot of scripts we can test again GraalVM, no problem. Just post it when you have a new release and I’ll give it a try.<br class=""><br class=""><blockquote type="cite" class=""><br class="">&gt; Nashorn’s performance is ok for us but an increase would be much<br class="">&gt; appreciated. Are there plans to provide that?<br class=""><br class="">Graal JavaScript is significantly faster than Nashorn on most peak performance benchmarks (often orders of magnitude faster). But please note the difference: Nashorn always&nbsp;compiles the JavaScript code it executes to bytecode. Graal JavaScript requires Graal as optimizing compiler to achive good performance. The setup you are testing right now&nbsp;does not include Graal, so in your case, JavaScript is only interpreted, thus you will experience a performance impact.<br class=""></blockquote><br class="">Interpreted is not an option for us.<br class=""><br class="">Thanks,<br class="">Andreas<br class="">--&nbsp;<br class="">Andreas Mueller<br class="">IIT Software GmbH<br class="">http://www.swiftmq.com<br class=""><br class=""><span id="cid:D8D52512-246D-49DF-A1D7-CA2813FBD86A@multi.box">&lt;swiftmq_logo_positiv.png&gt;</span><br class=""><br class=""><br class=""><br class="">IIT Software GmbH<br class="">Falkenhorst 11, 48155 Münster, Germany<br class="">Phone: +49 (0)251 39 72 99 00<br class="">Managing Director: Andreas Müller<br class="">District Court: Amtsgericht Münster, HRB 16294<br class="">VAT-No: DE199945912<br class=""><br class="">This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender&nbsp;immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.<br class="">_______________________________________________<br class="">GraalVM-Users mailing list<br class="">GraalVM-Users@oss.oracle.com<br class="">https://oss.oracle.com/mailman/listinfo/graalvm-users<br class=""></blockquote><br class=""><div class=""><br class=""></div></div><BR />
<BR />
<HR />
IIT&nbsp;Software&nbsp;GmbH<BR />
Falkenhorst&nbsp;11,&nbsp;48155&nbsp;Münster,&nbsp;Germany<BR />
Phone:&nbsp;+49&nbsp;(0)251&nbsp;39&nbsp;72&nbsp;99&nbsp;00<BR />
Managing&nbsp;Director:&nbsp;Andreas&nbsp;Müller<BR />
District&nbsp;Court:&nbsp;Amtsgericht&nbsp;Münster,&nbsp;HRB&nbsp;16294<BR />
VAT-No:&nbsp;DE199945912<BR />
<BR />
This&nbsp;e-mail&nbsp;may&nbsp;contain&nbsp;confidential&nbsp;and/or&nbsp;privileged&nbsp;information.&nbsp;If&nbsp;you&nbsp;are&nbsp;not&nbsp;the&nbsp;intended&nbsp;recipient&nbsp;(or&nbsp;have&nbsp;received&nbsp;this&nbsp;e-mail&nbsp;in&nbsp;error)&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;immediately&nbsp;and&nbsp;destroy&nbsp;this&nbsp;e-mail.&nbsp;Any&nbsp;unauthorized&nbsp;copying,&nbsp;disclosure&nbsp;or&nbsp;distribution&nbsp;of&nbsp;the&nbsp;material&nbsp;in&nbsp;this&nbsp;e-mail&nbsp;is&nbsp;strictly&nbsp;forbidden.<BR />
</body></html>