Package com.facebook.presto.byteCode

Examples of com.facebook.presto.byteCode.Block.invokeInterface()


                Block isNotNull = new Block(context)
                        .getVariable(cursorVariable)
                        .push(field);

                String methodName = "get" + Primitives.wrap(javaType).getSimpleName();
                isNotNull.invokeInterface(RecordCursor.class, methodName, javaType, int.class);

                return new IfStatement(context, isNullCheck, isNull, isNotNull);
            }

            @Override
View Full Code Here


                Block isNotNull = new Block(context)
                        .getVariable(cursorVariable)
                        .push(field);

                String methodName = "get" + Primitives.wrap(javaType).getSimpleName();
                isNotNull.invokeInterface(RecordCursor.class, methodName, javaType, int.class);

                return new IfStatement(context, isNullCheck, isNull, isNotNull);
            }

            @Override
View Full Code Here

            body.getVariable("arg" + (i + 1));
            stackType = stackTypes.get(i + 1);
            if (stackType.isPrimitive()) {
                body.append(ByteCodeUtils.boxPrimitiveIfNecessary(context, stackType));
            }
            body.invokeInterface(Map.class, "put", Object.class, Object.class, Object.class);
        }

        body.comment("return toStackRepresentation(values);")
                .getVariable(valuesVariable)
                .invokeStatic(MapType.class, "toStackRepresentation", Slice.class, Map.class)
View Full Code Here

                    .getVariable("arg" + i);
            Class<?> stackType = stackTypes.get(i);
            if (stackType.isPrimitive()) {
                body.append(ByteCodeUtils.boxPrimitiveIfNecessary(context, stackType));
            }
            body.invokeInterface(List.class, "add", boolean.class, Object.class);
        }

        body.comment("return toStackRepresentation(values);")
                .getVariable(valuesVariable)
                .invokeStatic(ArrayType.class, "toStackRepresentation", Slice.class, List.class)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.