Examples of EffectSet


Examples of joust.tree.annotatedtree.treeinfo.EffectSet

        // We're just going to tactfully omit dependency information for now. That shit's complicated.
    }

    @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

Examples of joust.tree.annotatedtree.treeinfo.EffectSet

        if (visited.contains(this)) {
            return;
        }
        visited.add(this);

        EffectSet oldEffects = effectSet;
        effectSet = e;
        if (dependantOnThis.isEmpty()) {
            return;
        }

        if (oldEffects.equals(e)) {
            return;
        }

        // Determine if this change only *added* effects. If so we can use a simpler routine to update...
        if (e.contains(oldEffects)) {
View Full Code Here

Examples of joust.tree.annotatedtree.treeinfo.EffectSet

            return;
        }
        visited.add(this);
        log.trace("Rebuilding effects from children...");

        EffectSet newEffectSet = EffectSet.NO_EFFECTS.union(directPart);
        log.trace("Old: {}", newEffectSet);
        for (Effects child : deps) {
            if (child == this) {
                continue;
            }

            if (!visited.contains(child)) {
                child.rebuildFromChildrenInternal(visited);
            }

            newEffectSet = newEffectSet.union(child.effectSet);
        }
        log.trace("New: {}", newEffectSet);

        setEffectSetInternal(newEffectSet, visited);
    }
View Full Code Here

Examples of joust.tree.annotatedtree.treeinfo.EffectSet

        Set<AJCEffectAnnotatedTree> incompleted = incompleteCalls.get(completedSym);
        if (incompleted != null) {
            for (AJCEffectAnnotatedTree t : incompleted) {
                Effects tEffects = t.effects;
                EffectSet newEffectSet = tEffects.effectSet.union(effects.effectSet);

                // Update dependencies...
                tEffects.deps.add(effects);
                effects.dependantOnThis.add(tEffects);
View Full Code Here

Examples of joust.tree.annotatedtree.treeinfo.EffectSet

    @Override
    public void visitThrow(AJCThrow that) {
        super.visitThrow(that);

        that.effects = Effects.unionWithDirect(new EffectSet(EffectType.EXCEPTION), that.expr.effects);
    }
View Full Code Here

Examples of joust.tree.annotatedtree.treeinfo.EffectSet

        }

        log.trace("Entering special assignment effects routine for {}", that);
        // TODO: This routine is almost comically inefficient.
        // Construct an EffectSet for "Writes everything read by the lhs".
        EffectSet lhsEffects = that.lhs.effects.getEffectSet();

        SymbolSet readEscaping = lhsEffects.readEscaping == SymbolSet.UNIVERSAL_SET ? SymbolSet.UNIVERSAL_SET : new SymbolSet(lhsEffects.readEscaping);
        SymbolSet readInternal = lhsEffects.readInternal == SymbolSet.UNIVERSAL_SET ? SymbolSet.UNIVERSAL_SET : new SymbolSet(lhsEffects.readInternal);

        EffectSet newEffects = new EffectSet((readEscaping.isEmpty() ? 0 : EffectType.WRITE_ESCAPING.maskValue)
                                           | (readInternal.isEmpty() ? 0 : EffectType.WRITE_INTERNAL.maskValue));

        newEffects.writeEscaping = readEscaping;
        newEffects.writeInternal = readInternal;
View Full Code Here

Examples of joust.tree.annotatedtree.treeinfo.EffectSet


        log.trace("Entering special assignment effects routine for {}", that);
        // TODO: This routine is almost comically inefficient.
        // Similar to assign, but we also immediately *read* everything, too.
        EffectSet lhsEffects = that.lhs.effects.getEffectSet();

        SymbolSet readEscaping = lhsEffects.readEscaping == SymbolSet.UNIVERSAL_SET ? SymbolSet.UNIVERSAL_SET : new SymbolSet(lhsEffects.readEscaping);
        SymbolSet writeEscaping = lhsEffects.readEscaping == SymbolSet.UNIVERSAL_SET ? SymbolSet.UNIVERSAL_SET : new SymbolSet(lhsEffects.readEscaping);
        SymbolSet readInternal = lhsEffects.readInternal == SymbolSet.UNIVERSAL_SET ? SymbolSet.UNIVERSAL_SET : new SymbolSet(lhsEffects.readInternal);
        SymbolSet writeInternal = lhsEffects.readInternal == SymbolSet.UNIVERSAL_SET ? SymbolSet.UNIVERSAL_SET : new SymbolSet(lhsEffects.readInternal);

        EffectSet newEffects = new EffectSet((readEscaping.isEmpty() ? 0 : EffectType.WRITE_ESCAPING.maskValue
                                                                         | EffectType.READ_ESCAPING.maskValue)
                                           | (readInternal.isEmpty() ? 0 : EffectType.WRITE_INTERNAL.maskValue
                                                                         | EffectType.READ_INTERNAL.maskValue));

        newEffects.writeEscaping = writeEscaping;
View Full Code Here

Examples of joust.tree.annotatedtree.treeinfo.EffectSet

        Set<AJCEffectAnnotatedTree> incompleted = incompleteCalls.get(completedSym);
        if (incompleted != null) {
            for (AJCEffectAnnotatedTree t : incompleted) {
                Effects tEffects = t.effects;
                EffectSet newEffectSet = tEffects.effectSet.union(effects.effectSet);

                // Update dependencies...
                tEffects.deps.add(effects);
                effects.dependantOnThis.add(tEffects);
View Full Code Here

Examples of joust.tree.annotatedtree.treeinfo.EffectSet

    @Override
    public void visitThrow(AJCThrow that) {
        super.visitThrow(that);

        that.effects = Effects.unionWithDirect(new EffectSet(EffectType.EXCEPTION), that.expr.effects);
    }
View Full Code Here

Examples of joust.tree.annotatedtree.treeinfo.EffectSet

        }

        log.trace("Entering special assignment effects routine for {}", that);
        // TODO: This routine is almost comically inefficient.
        // Construct an EffectSet for "Writes everything read by the lhs".
        EffectSet lhsEffects = that.lhs.effects.getEffectSet();

        SymbolSet readEscaping = lhsEffects.readEscaping == SymbolSet.UNIVERSAL_SET ? SymbolSet.UNIVERSAL_SET : new SymbolSet(lhsEffects.readEscaping);
        SymbolSet readInternal = lhsEffects.readInternal == SymbolSet.UNIVERSAL_SET ? SymbolSet.UNIVERSAL_SET : new SymbolSet(lhsEffects.readInternal);

        EffectSet newEffects = new EffectSet((readEscaping.isEmpty() ? 0 : EffectType.WRITE_ESCAPING.maskValue)
                                           | (readInternal.isEmpty() ? 0 : EffectType.WRITE_INTERNAL.maskValue));

        newEffects.writeEscaping = readEscaping;
        newEffects.writeInternal = readInternal;
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.