Package joust.analysers.sideeffects

Examples of joust.analysers.sideeffects.Effects


        protected AJCLiteral(JCLiteral tree) {
            super(tree);

            tree.value = sanitiseLiteralValue(tree.typetag, tree.value);
            decoratedTree = tree;
            effects = new Effects(EffectSet.NO_EFFECTS);
        }
View Full Code Here


     * @return The corresponding EffectSet memory, or the set of all effects if no such EffectSet is found.
     */
    public static Effects getEffectsForMethod(MethodSymbol sym) {
        String symbolHash = MethodInfo.getHashForMethod(sym);

        Effects effects = methodEffectMap.get(symbolHash);
        if (effects != null) {
            return effects;
        }

        log.debug("Unable to source side effects for method: {}. This will harm optimisation - such calls are taken to have all possible side effects!", sym);
        return new Effects(EffectSet.ALL_EFFECTS, EffectSet.ALL_EFFECTS);
    }
View Full Code Here

     * An expression that does nothing.
     */
    public static class AJCEmptyExpression extends AJCExpressionTree {
        protected AJCEmptyExpression() {
            super(null);
            effects = new Effects(EffectSet.NO_EFFECTS);
        }
View Full Code Here

        @Delegate @Getter private final JCSkip decoratedTree;

        protected AJCSkip(JCSkip tree) {
            super(tree);
            decoratedTree = tree;
            effects = new Effects(EffectSet.NO_EFFECTS);
        }
View Full Code Here

        if (that instanceof AJCEffectAnnotatedTree) {
            AJCEffectAnnotatedTree cast = (AJCEffectAnnotatedTree) that;
            // Disconnect it from the effect dependency tree.
            cast.effects.deps = null;
            cast.effects.dependantOnThis = null;
            cast.effects = new Effects(EffectSet.ALL_EFFECTS);
        }

        super.visit(that);
    }
View Full Code Here

    @Override
    public Effects read(Kryo kryo, Input input, Class<Effects> effectsClass) {
        EffectSet directPart = kryo.readObject(input, EffectSet.class);
        EffectSet computedPart = kryo.readObject(input, EffectSet.class);

        Effects ret = new Effects(computedPart, directPart);

        return ret;
    }
View Full Code Here

public class VisitorResultPurger extends AJCTreeVisitor {
    @Override
    public void visit(AJCTree that) {
        if (that instanceof AJCEffectAnnotatedTree) {
            AJCEffectAnnotatedTree cast = (AJCEffectAnnotatedTree) that;
            cast.effects = new Effects(EffectSet.ALL_EFFECTS);
            cast.liveVariables = null;
        }

        super.visit(that);
    }
View Full Code Here

TOP

Related Classes of joust.analysers.sideeffects.Effects

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.