@Override
    public Value getValue(Designator d, BasicBlock cur, Environment env)
        throws Exception {
        if(global) {
            used = true;
        }
        if(!(d instanceof ArrayDesignator)) {
            throw new Exception("Array accessed as a variable");
        }
        Value a = emitIndexingCode((ArrayDesignator)d, cur);
        Load l = new Load(d.getVarName(), global, a);
        cur.addInstruction(l);
        return l;
    }