-
Notifications
You must be signed in to change notification settings - Fork 202
Open
Description
In the ScriptEngine paradigm - things were simple.
Create a CompiledScript and ask it to evaluate with Bindings.
Like this:
I am wondering in graal - with Context, how to do it?
Admittedly I tried putMember in the Context Binding - it did not work.
context.getBindings("js").putMember("N", 2000);
context.getBindings("js").putMember("EXPECTED", 17393);
context.eval(Source.newBuilder("js", SOURCE, "src.js").build());
Value primesMain = context.getBindings("js").getMember("primesMain");I am finding myself a bit foolish and clueless here, how to achieve this?
Actually, right now I am using graaljs via ScriptEngine, so this problem is not an issue. But I am planning to migrate all graal powered languages into a much more "Context" based design - and this is blocking nmondal/cowj#148
Metadata
Metadata
Assignees
Labels
No labels