public Binding bind(MethodHandle method) { long bindingId = nextId++; Binding binding = new Binding(bindingId, method.type()); bindings.put(bindingId, method); return binding; }
public static BytecodeExpression loadConstant(Binding binding) { return invokeDynamic( BOOTSTRAP_METHOD, ImmutableList.of(binding.getBindingId()), "constant_" + binding.getBindingId(), binding.getType().returnType()); }
Binding binding = binder.bind(bestChoice.getMethodHandle()); MethodType methodType = binding.getType(); Class<?> returnType = methodType.returnType(); Class<?> unboxedReturnType = Primitives.unwrap(returnType);
public static BytecodeNode generateInvocation(Scope scope, String name, ScalarFunctionImplementation function, Optional<BytecodeNode> instance, List<BytecodeNode> arguments, Binding binding) MethodType methodType = binding.getType();
public static BytecodeExpression invoke(Binding binding, String name) { return invokeDynamic(BOOTSTRAP_METHOD, ImmutableList.of(binding.getBindingId()), name, binding.getType()); }
public Binding bind(MethodHandle method) { long bindingId = nextId++; Binding binding = new Binding(bindingId, method.type()); bindings.put(bindingId, method); return binding; }
@Override public BytecodeNode getBytecode(MethodGenerationContext generationContext) { return InvokeInstruction.invokeDynamic(type.getTypeSignature().toString().replaceAll("\\W+", "_"), binding.getType(), bootstrapMethod, binding.getBindingId()); }
BytecodeExpression invokeInputFunction = invokeDynamic( BOOTSTRAP_METHOD, ImmutableList.of(binding.getBindingId()), "input", binding.getType(), getInvokeFunctionOnWindowIndexParameters( scope,
public static BytecodeNode invoke(Binding binding, String name) { return invokeDynamic(BOOTSTRAP_METHOD, ImmutableList.of(binding.getBindingId()), name, binding.getType()); }
public static BytecodeExpression loadConstant(Binding binding) { return invokeDynamic( BOOTSTRAP_METHOD, ImmutableList.of(binding.getBindingId()), "constant_" + binding.getBindingId(), binding.getType().returnType()); }
@Override public BytecodeNode getBytecode(MethodGenerationContext generationContext) { return InvokeInstruction.invokeDynamic(type.getTypeSignature().toString().replaceAll("\\W+", "_"), binding.getType(), bootstrapMethod, binding.getBindingId()); }