Package com.facebook.presto.byteCode.control

Examples of com.facebook.presto.byteCode.control.IfStatement


                    .getVariable(tempVariable.getLocalVariableDefinition())
                    .invokeStatic(Operations.class, "equal", boolean.class, valueType, valueType)
                    .visitLabel(nullCondition)
                    .putVariable("wasNull", false);

            elseValue = typedByteCodeNode(new IfStatement(context,
                    format("when %s", whenClause),
                    condition,
                    coerceToType(context, whenClause.value, resultType).getNode(),
                    elseValue.getNode()), resultType);
        }
View Full Code Here


        Block trueBlock = new Block(context)
                .putVariable("wasNull", true)
                .pop(first.getType())
                .pushJavaDefault(first.getType());

        block.append(new IfStatement(context, conditionBlock, trueBlock, notMatch));

        return typedByteCodeNode(block, first.getType());
    }
View Full Code Here

            Block nullBlock = new Block(context)
                    .pop(type)
                    .putVariable("wasNull", false)
                    .append(nullValue.getNode());

            nullValue = typedByteCodeNode(new IfStatement(context, condition, nullBlock, NOP), type);
        }

        return typedByteCodeNode(nullValue.getNode(), type);
    }
View Full Code Here

                    ImmutableList.<TypedByteCodeNode>of(),
                    new InFunctionBinder(type, constantValues));

            switchBlock = new Block(context)
                    .comment("inListSet.contains(<stackValue>)")
                    .append(new IfStatement(context,
                            new Block(context).dup(type).invokeDynamic(functionBinding.getName(), functionBinding.getCallSite().type(), functionBinding.getBindingId()),
                            jump(match),
                            NOP));
        }
View Full Code Here

        if (!stackArgsToPop.isEmpty()) {
            popComment = format("pop(%s)", Joiner.on(", ").join(stackArgsToPop));
        }

        String comment = format("if wasNull then %s", Joiner.on(", ").skipNulls().join(clearComment, popComment, loadDefaultComment, "goto " + label.getLabel()));
        return new IfStatement(context, comment, nullCheck, isNull, NOP);
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.byteCode.control.IfStatement

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.