Package io.trino.sql.gen
Class BytecodeUtils
java.lang.Object
io.trino.sql.gen.BytecodeUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.airlift.bytecode.BytecodeNodeboxPrimitiveIfNecessary(io.airlift.bytecode.Scope scope, Class<?> type) static io.airlift.bytecode.BytecodeNodegenerateFullInvocation(io.airlift.bytecode.Scope scope, ResolvedFunction resolvedFunction, FunctionManager functionManager, Function<MethodHandle, io.airlift.bytecode.BytecodeNode> instanceFactory, List<Function<Optional<Class<?>>, io.airlift.bytecode.BytecodeNode>> argumentCompilers, CallSiteBinder binder) static io.airlift.bytecode.BytecodeNodegenerateInvocation(io.airlift.bytecode.Scope scope, ResolvedFunction resolvedFunction, FunctionManager functionManager, List<io.airlift.bytecode.BytecodeNode> arguments, CallSiteBinder binder) static io.airlift.bytecode.BytecodeNodegenerateInvocation(io.airlift.bytecode.Scope scope, String functionName, FunctionNullability functionNullability, Function<InvocationConvention, ScalarFunctionImplementation> functionImplementationProvider, List<io.airlift.bytecode.BytecodeNode> arguments, CallSiteBinder binder) static io.airlift.bytecode.BytecodeNodegenerateWrite(CallSiteBinder callSiteBinder, io.airlift.bytecode.Scope scope, io.airlift.bytecode.Variable wasNullVariable, Type type) static io.airlift.bytecode.BytecodeNodehandleNullValue(io.airlift.bytecode.Scope scope, io.airlift.bytecode.instruction.LabelNode label, Class<?> returnType, List<Class<?>> stackArgsToPop, boolean clearNullFlag) static io.airlift.bytecode.BytecodeNodeifWasNullClearPopAndGoto(io.airlift.bytecode.Scope scope, io.airlift.bytecode.instruction.LabelNode label, Class<?> returnType, Class<?>... stackArgsToPop) static io.airlift.bytecode.BytecodeNodeifWasNullPopAndGoto(io.airlift.bytecode.Scope scope, io.airlift.bytecode.instruction.LabelNode label, Class<?> returnType, Class<?>... stackArgsToPop) static io.airlift.bytecode.BytecodeNodeifWasNullPopAndGoto(io.airlift.bytecode.Scope scope, io.airlift.bytecode.instruction.LabelNode label, Class<?> returnType, Iterable<? extends Class<?>> stackArgsToPop) static io.airlift.bytecode.expression.BytecodeExpressioninvoke(Binding binding, BoundSignature signature) static io.airlift.bytecode.expression.BytecodeExpressioninvoke(Binding binding, String name, io.airlift.bytecode.expression.BytecodeExpression... parameters) static io.airlift.bytecode.expression.BytecodeExpressioninvoke(Binding binding, String name, List<io.airlift.bytecode.expression.BytecodeExpression> parameters) static io.airlift.bytecode.expression.BytecodeExpressionloadConstant(Binding binding) static io.airlift.bytecode.expression.BytecodeExpressionloadConstant(CallSiteBinder callSiteBinder, Object constant, Class<?> type) static StringsanitizeName(String name) Replace characters that are not safe to use in a JVM identifier.static io.airlift.bytecode.BytecodeNodeunboxPrimitive(Class<?> unboxedType) static io.airlift.bytecode.BytecodeBlockunboxPrimitiveIfNecessary(io.airlift.bytecode.Scope scope, Class<?> boxedType)
-
Method Details
-
ifWasNullPopAndGoto
-
ifWasNullPopAndGoto
-
ifWasNullClearPopAndGoto
-
handleNullValue
-
unboxPrimitive
-
loadConstant
public static io.airlift.bytecode.expression.BytecodeExpression loadConstant(CallSiteBinder callSiteBinder, Object constant, Class<?> type) -
loadConstant
-
generateInvocation
public static io.airlift.bytecode.BytecodeNode generateInvocation(io.airlift.bytecode.Scope scope, ResolvedFunction resolvedFunction, FunctionManager functionManager, List<io.airlift.bytecode.BytecodeNode> arguments, CallSiteBinder binder) -
generateInvocation
public static io.airlift.bytecode.BytecodeNode generateInvocation(io.airlift.bytecode.Scope scope, String functionName, FunctionNullability functionNullability, Function<InvocationConvention, ScalarFunctionImplementation> functionImplementationProvider, List<io.airlift.bytecode.BytecodeNode> arguments, CallSiteBinder binder) -
generateFullInvocation
public static io.airlift.bytecode.BytecodeNode generateFullInvocation(io.airlift.bytecode.Scope scope, ResolvedFunction resolvedFunction, FunctionManager functionManager, Function<MethodHandle, io.airlift.bytecode.BytecodeNode> instanceFactory, List<Function<Optional<Class<?>>, io.airlift.bytecode.BytecodeNode>> argumentCompilers, CallSiteBinder binder) -
unboxPrimitiveIfNecessary
public static io.airlift.bytecode.BytecodeBlock unboxPrimitiveIfNecessary(io.airlift.bytecode.Scope scope, Class<?> boxedType) -
boxPrimitiveIfNecessary
public static io.airlift.bytecode.BytecodeNode boxPrimitiveIfNecessary(io.airlift.bytecode.Scope scope, Class<?> type) -
invoke
-
invoke
-
invoke
public static io.airlift.bytecode.expression.BytecodeExpression invoke(Binding binding, BoundSignature signature) -
sanitizeName
Replace characters that are not safe to use in a JVM identifier. -
generateWrite
public static io.airlift.bytecode.BytecodeNode generateWrite(CallSiteBinder callSiteBinder, io.airlift.bytecode.Scope scope, io.airlift.bytecode.Variable wasNullVariable, Type type)
-