Package com.strobel.reflection.emit

Examples of com.strobel.reflection.emit.Label


        final Expression right = b.getRight();

        final Type<?> leftType = left.getType();
        final Type<?> rightType = right.getType();

        final Label returnFalse = generator.defineLabel();
        final Label exit = generator.defineLabel();

//        final LocalBuilder leftStorage = getLocal(leftType);
//        final LocalBuilder rightStorage = getLocal(rightType);

        emitExpression(left);
View Full Code Here


        final Expression right = b.getRight();

        final Type<?> leftType = left.getType();
        final Type<?> rightType = right.getType();

        final Label returnFalse = generator.defineLabel();
        final Label exit = generator.defineLabel();

//        final LocalBuilder leftStorage = getLocal(leftType);
//        final LocalBuilder rightStorage = getLocal(rightType);

        emitExpression(left);
View Full Code Here

        final Expression right = b.getRight();

        final Type<?> leftType = left.getType();
        final Type<?> rightType = right.getType();

        final Label returnTrue = generator.defineLabel();
        final Label exit = generator.defineLabel();

//        final LocalBuilder leftStorage = getLocal(leftType);
//        final LocalBuilder rightStorage = getLocal(rightType);

        emitExpression(left);
View Full Code Here

        final Expression right = b.getRight();

        final Type<?> leftType = left.getType();
        final Type<?> rightType = right.getType();

        final Label returnTrue = generator.defineLabel();
        final Label exit = generator.defineLabel();

//        final LocalBuilder leftStorage = getLocal(leftType);
//        final LocalBuilder rightStorage = getLocal(rightType);

        emitExpression(left);
View Full Code Here

            emitReferenceCoalesceWithoutConversion(b);
        }
    }

    private void emitReferenceCoalesceWithoutConversion(final BinaryExpression b) {
        final Label end = generator.defineLabel();

        final boolean needConvertLeft = !TypeUtils.areEquivalent(b.getLeft().getType(), b.getType());
        final boolean needConvertRight = !TypeUtils.areEquivalent(b.getRight().getType(), b.getType());

        final Label convertLeft = needConvertLeft ? generator.defineLabel() : null;

        emitExpression(b.getLeft());

        generator.dup();
        generator.emit(OpCode.IFNONNULL, needConvertLeft ? convertLeft : end);
View Full Code Here

    }

    private void emitLambdaReferenceCoalesce(final BinaryExpression b) {
        final LocalBuilder operandStorage = getLocal(b.getLeft().getType());

        final Label end = generator.defineLabel();
        final Label notNull = generator.defineLabel();

        emitExpression(b.getLeft());

        generator.dup();
        generator.emitStore(operandStorage);
View Full Code Here

    private void emitConditionalExpression(final Expression expr, final int flags) {
        final ConditionalExpression node = (ConditionalExpression) expr;

        assert node.getTest().getType() == PrimitiveTypes.Boolean;

        final Label ifFalse = generator.defineLabel();

        emitExpressionAndBranch(false, node.getTest(), ifFalse);
        emitExpressionAsType(node.getIfTrue(), node.getType(), flags);

        if (notEmpty(node.getIfFalse())) {
            final Label end = generator.defineLabel();

            generator.emitGoto(end);
            generator.markLabel(ifFalse);

            emitExpressionAsType(node.getIfFalse(), node.getType(), flags);
View Full Code Here

            case LessThan:
            case LessThanOrEqual:
            case NotEqual:
            case ReferenceEqual:
            case ReferenceNotEqual: {
                final Label ifFalse = generator.defineLabel();
                final Label exit = generator.defineLabel();

                emitRelationalBranchOp(op, operandType, false, ifFalse);

                generator.emitBoolean(true);
                generator.emitGoto(exit);
View Full Code Here

        return finalLeftType;
    }

    private void emitLiftedBooleanAnd(final Type leftType, final Type rightType) {
        final Type type = PrimitiveTypes.Boolean;
        final Label returnFalse = generator.defineLabel();
        final Label exit = generator.defineLabel();

        final LocalBuilder rightStorage = getLocal(type);

        generator.emitStore(rightStorage);
View Full Code Here

        freeLocal(rightStorage);
    }

    private void emitLiftedBooleanOr(final Type leftType, final Type rightType) {
        final Type type = PrimitiveTypes.Boolean;
        final Label returnTrue = generator.defineLabel();
        final Label exit = generator.defineLabel();

        final LocalBuilder rightStorage = getLocal(type);

        generator.emitStore(rightStorage);
View Full Code Here

TOP

Related Classes of com.strobel.reflection.emit.Label

Copyright © 2018 www.massapicom. 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.