Examples of ret()


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

        }

        constructor.comment("this.position = -1;")
                .append(context.getVariable("this").setField(positionField, constantInt(-1)));

        constructor.ret();
    }

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

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

                    .append(constantType(context, callSiteBinder, type).invoke("appendTo", void.class,
                            context.getVariable("this").getField(blockFields.get(index)),
                            context.getVariable("this").getField(positionField),
                            context.getVariable("pageBuilder").invoke("getBlockBuilder", BlockBuilder.class, constantInt(index))));
        }
        appendToBody.ret();
    }

    private void generateAdvanceNextPosition(ClassDefinition classDefinition, FieldDefinition positionField, FieldDefinition positionCountField)
    {
        CompilerContext context = new CompilerContext(BOOTSTRAP_METHOD);
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();
View Full Code Here

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

                    .push(size)
                    .invokeInterface(BlockBuilder.class, "writeBytes", BlockBuilder.class, Slice.class, int.class, int.class)
                    .invokeInterface(BlockBuilder.class, "closeEntry", BlockBuilder.class)
                    .pop();
        }
        serializerBody.ret();
    }

    private static void generateSerializeFieldToSlice(Block body, Variable 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

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(a(PUBLIC), "getEstimatedSize", type(long.class))
                .getBody()
                .comment("long size = 0;")
View Full Code Here

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

                    .pushThis()
                    .getField(stateField)
                    .getVariable("out")
                    .invokeInterface(AccumulatorStateSerializer.class, "serialize", void.class, Object.class, BlockBuilder.class);
        }
        body.ret();
    }

    private static void generateEvaluateFinal(
            ClassDefinition definition,
            MethodDefinition getFinalType,
View Full Code Here

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

        assertEquals(setPoint.toString(), "point = new Point(3, 7);");

        Block block = new Block(context)
                .append(setPoint)
                .append(point.ret());

        assertByteCodeNode(block, type(Point.class), new Point(3, 7));
    }
}
View Full Code Here

Examples of com.facebook.swift.codec.internal.compiler.byteCode.MethodDefinition.ret()

                    .loadVariable(fieldDefinition.getName())
                    .putField(codecType, fieldDefinition);
        }

        // return; (implicit)
        constructor.ret();

        classDefinition.addMethod(constructor);
    }

    /**
 
View Full Code Here

Examples of com.facebook.swift.codec.internal.compiler.byteCode.MethodDefinition.ret()

        }

        write.loadVariable(protocol)
                .invokeVirtual(TProtocolWriter.class, "writeStructEnd", void.class);

        write.ret();
    }

    /**
     * Define the write method.
     */
 
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.