Search in sources :

Example 11 with TruffleOptionsOverrideScope

use of org.graalvm.compiler.truffle.common.TruffleCompilerOptions.TruffleOptionsOverrideScope in project graal by oracle.

the class SLCallWithOptionOverrideBuiltin method callWithOptionOverride.

@Specialization
public SLFunction callWithOptionOverride(SLFunction function, String name, Object value) {
    TruffleOptionsOverrideScope scope = override(name, value);
    OptimizedCallTarget target = ((OptimizedCallTarget) function.getCallTarget());
    indirectCall.call(target, EMPTY_ARGS);
    close(scope);
    return function;
}
Also used : TruffleOptionsOverrideScope(org.graalvm.compiler.truffle.common.TruffleCompilerOptions.TruffleOptionsOverrideScope) OptimizedCallTarget(org.graalvm.compiler.truffle.runtime.OptimizedCallTarget) Specialization(com.oracle.truffle.api.dsl.Specialization)

Aggregations

TruffleOptionsOverrideScope (org.graalvm.compiler.truffle.common.TruffleCompilerOptions.TruffleOptionsOverrideScope)11 OptimizedCallTarget (org.graalvm.compiler.truffle.runtime.OptimizedCallTarget)8 Test (org.junit.Test)8 VirtualFrame (com.oracle.truffle.api.frame.VirtualFrame)3 LoopNode (com.oracle.truffle.api.nodes.LoopNode)3 OptimizedOSRLoopNode (org.graalvm.compiler.truffle.runtime.OptimizedOSRLoopNode)3 StructuredGraph (org.graalvm.compiler.nodes.StructuredGraph)2 OptionValues (org.graalvm.compiler.options.OptionValues)2 GraalTruffleRuntime (org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime)2 Ignore (org.junit.Ignore)2 Assumption (com.oracle.truffle.api.Assumption)1 CallTarget (com.oracle.truffle.api.CallTarget)1 CompilerDirectives (com.oracle.truffle.api.CompilerDirectives)1 Truffle (com.oracle.truffle.api.Truffle)1 Specialization (com.oracle.truffle.api.dsl.Specialization)1 FrameDescriptor (com.oracle.truffle.api.frame.FrameDescriptor)1 DirectCallNode (com.oracle.truffle.api.nodes.DirectCallNode)1 Node (com.oracle.truffle.api.nodes.Node)1 RepeatingNode (com.oracle.truffle.api.nodes.RepeatingNode)1 RootNode (com.oracle.truffle.api.nodes.RootNode)1