graal-js - passing JS native object to Java - com.oracle.truffle.object.enterprise.b

Andreas Woess andreas.woess at oracle.com
Mon Jan 8 23:10:05 UTC 2018


Hi Adam!

This is an implementation class that is leaked, probably through Java
interop. We're currently reworking the value conversions so that
language objects are always exposed as wrapper objects that Java code
can work with, e.g. implementing java.util.Map (similar to
ScriptObjectMirror).

- andreas

On 2018-01-09 00:04, Thomas Wuerthinger wrote:
> Sorry for an outdated link, this one should work: https://oracle.github.io/graal/truffle/javadoc/index.html?org/graalvm/polyglot/Value.html
>
> - thomas
>
>
>> On 08.01.2018, at 22:59, Thomas Wuerthinger <thomas.wuerthinger at oracle.com> wrote:
>>
>> Hi Adam!
>>
>> The only class you should ever have to work with is in that context is org.graalvm.polyglot.Value (see javadoc at http://graalvm.github.io/graal/truffle/javadoc/index.html?org/graalvm/polyglot/Value.html). We are not exposing implementation-internal classes but instead have this language-agnostic Value interface abstraction. Can you share your code snippet?
>>
>> Thanks, thomas
>>
>>
>>> On 08.01.2018, at 22:32, Adam McMahon <adam at cs.miami.edu> wrote:
>>>
>>> Hi,
>>>
>>> I am attempting to get a few nashorn projects working with graal.js.  Often
>>> we need to pass native JS objects back to Java.  In nashorn, this would be
>>> passed back to Java as a jdk.nashorn.api.scripting.ScriptObjectMirror.
>>>
>>> Using Graal-js it seems to be passed back as a
>>> com.oracle.truffle.object.enterprise.b.  Is the actual name of this class
>>> really just "b" (perhaps for "bindings")?
>>>
>>> Do you happen to have a link to javadoc for this class?  Or any other info?
>>>
>>> Thanks,
>>>
>>> -Adam




More information about the graal-dev mailing list