Examples of ret()


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

        for (StateField field : fields) {
            fieldDefinitions.add(generateGroupedField(definition, constructor, ensureCapacity, field));
        }

        constructor.ret();
        ensureCapacity.ret();

        // Generate getEstimatedSize
        Block getEstimatedSize = definition.declareMethod(new CompilerContext(null), a(PUBLIC), "getEstimatedSize", type(long.class))
                .getBody()
                .comment("long size = 0;")
View Full Code Here

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

                .comment("this.position = -1;")
                .pushThis()
                .push(-1)
                .putField(positionField);

        constructor.ret();
    }

    private void generateGetChannelCountMethod(ClassDefinition classDefinition, int channelCount)
    {
        classDefinition.declareMethod(new CompilerContext(bootstrapMethod),
View Full Code Here

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

                    .getVariable("pageBuilder")
                    .push(index)
                    .invokeVirtual(PageBuilder.class, "getBlockBuilder", BlockBuilder.class, int.class)
                    .invokeInterface(com.facebook.presto.spi.block.Block.class, "appendTo", void.class, int.class, BlockBuilder.class);
        }
        appendToBody.ret();
    }

    private void generateAdvanceNextPosition(ClassDefinition classDefinition, FieldDefinition positionField, FieldDefinition positionCountField)
    {
        CompilerContext compilerContext = new CompilerContext(bootstrapMethod);
View Full Code Here

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

                    .pushThis()
                    .getField(probeChannelFields.get(index))
                    .putObjectArrayElement();
        }

        constructor.ret();
    }

    private void generateGetChannelCountMethod(ClassDefinition classDefinition, int channelCount)
    {
        classDefinition.declareMethod(new CompilerContext(bootstrapMethod),
View Full Code Here

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

                    .getVariable("pageBuilder")
                    .push(index)
                    .invokeVirtual(PageBuilder.class, "getBlockBuilder", BlockBuilder.class, int.class)
                    .invokeInterface(BlockCursor.class, "appendTo", void.class, BlockBuilder.class);
        }
        appendToBody.ret();
    }

    private void generateAdvanceNextPosition(ClassDefinition classDefinition, List<FieldDefinition> cursorFields)
    {
        CompilerContext compilerContext = new CompilerContext(bootstrapMethod);
View Full Code Here

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

                    .invokeInterface(List.class, "get", Object.class, int.class)
                    .checkCast(type(List.class, RandomAccessBlock.class))
                    .putField(joinChannelFields.get(index));
        }

        constructor.ret();
    }

    private void generateGetChannelCountMethod(ClassDefinition classDefinition, List<FieldDefinition> channelFields)
    {
        classDefinition.declareMethod(new CompilerContext(bootstrapMethod),
View Full Code Here

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

                    .push(index)
                    .append(OpCodes.IADD)
                    .invokeVirtual(PageBuilder.class, "getBlockBuilder", BlockBuilder.class, int.class)
                    .invokeInterface(RandomAccessBlock.class, "appendTo", void.class, int.class, BlockBuilder.class);
        }
        appendToBody.ret();
    }

    private void generateHashPositionMethod(ClassDefinition classDefinition, List<FieldDefinition> joinChannelFields)
    {
        MethodDefinition hashPositionMethod = classDefinition.declareMethod(new CompilerContext(bootstrapMethod),
View Full Code Here

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

            for (StateField field : fields) {
                generateDeserializeFromSlice(deserializerBody, slice, getSetter(clazz, field), offsetOfField(field, fields));
            }
        }
        deserializerBody.ret();
    }

    private static <T> void generateSerialize(ClassDefinition definition, Class<T> clazz, List<StateField> fields)
    {
        CompilerContext compilerContext = new CompilerContext(null);
View Full Code Here

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

            serializerBody.comment("out.appendSlice(slice);")
                    .getVariable("out")
                    .getVariable(slice)
                    .invokeInterface(BlockBuilder.class, "appendSlice", BlockBuilder.class, Slice.class);
        }
        serializerBody.ret();
    }

    private static void generateSerializeFieldToSlice(Block body, LocalVariableDefinition slice, Method getter, int offset)
    {
        Method sliceSetterMethod = StateCompilerUtils.getSliceSetter(getter.getReturnType());
View Full Code Here

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

        List<StateField> fields = enumerateFields(clazz);
        for (StateField field : fields) {
            generateField(definition, constructor, field);
        }

        constructor.ret();

        return defineClass(definition, clazz, classLoader);
    }

    private static <T> Class<? extends T> generateGroupedStateClass(Class<T> clazz, DynamicClassLoader classLoader)
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.