@Override
    public void assignValue(Designator d, BasicBlock cur, BasicBlock join, Environment env, Value newVal)
        throws Exception {
        if(global) {
            used = true;
        }
        if(!(d instanceof ArrayDesignator)) {
            throw new Exception("Array accessed as a variable");
        }
        Value a = emitIndexingCode((ArrayDesignator)d, cur);
        Store s = new Store(d.getVarName(), a, newVal);
        cur.addInstruction(s);
        if(join != null) {
            join.addAtEndBeforeBranch(new Kill(d.getVarName()));
        }
    }