Class BytecodeUtils


  • public final class BytecodeUtils
    extends Object
    • Method Detail

      • ifWasNullPopAndGoto

        public static io.airlift.bytecode.BytecodeNode ifWasNullPopAndGoto​(io.airlift.bytecode.Scope scope,
                                                                           io.airlift.bytecode.instruction.LabelNode label,
                                                                           Class<?> returnType,
                                                                           Class<?>... stackArgsToPop)
      • ifWasNullPopAndGoto

        public static io.airlift.bytecode.BytecodeNode ifWasNullPopAndGoto​(io.airlift.bytecode.Scope scope,
                                                                           io.airlift.bytecode.instruction.LabelNode label,
                                                                           Class<?> returnType,
                                                                           Iterable<? extends Class<?>> stackArgsToPop)
      • ifWasNullClearPopAndGoto

        public static io.airlift.bytecode.BytecodeNode ifWasNullClearPopAndGoto​(io.airlift.bytecode.Scope scope,
                                                                                io.airlift.bytecode.instruction.LabelNode label,
                                                                                Class<?> returnType,
                                                                                Class<?>... stackArgsToPop)
      • handleNullValue

        public static io.airlift.bytecode.BytecodeNode handleNullValue​(io.airlift.bytecode.Scope scope,
                                                                       io.airlift.bytecode.instruction.LabelNode label,
                                                                       Class<?> returnType,
                                                                       List<Class<?>> stackArgsToPop,
                                                                       boolean clearNullFlag)
      • boxPrimitive

        public static io.airlift.bytecode.BytecodeNode boxPrimitive​(Class<?> type)
      • unboxPrimitive

        public static io.airlift.bytecode.BytecodeNode unboxPrimitive​(Class<?> unboxedType)
      • loadConstant

        public static io.airlift.bytecode.expression.BytecodeExpression loadConstant​(CallSiteBinder callSiteBinder,
                                                                                     Object constant,
                                                                                     Class<?> type)
      • loadConstant

        public static io.airlift.bytecode.expression.BytecodeExpression loadConstant​(Binding binding)
      • generateInvocation

        public static io.airlift.bytecode.BytecodeNode generateInvocation​(io.airlift.bytecode.Scope scope,
                                                                          ResolvedFunction resolvedFunction,
                                                                          Metadata metadata,
                                                                          List<io.airlift.bytecode.BytecodeNode> arguments,
                                                                          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

        public static io.airlift.bytecode.expression.BytecodeExpression invoke​(Binding binding,
                                                                               String name)
      • invoke

        public static io.airlift.bytecode.expression.BytecodeExpression invoke​(Binding binding,
                                                                               BoundSignature signature)
      • sanitizeName

        public static String sanitizeName​(String name)
        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)