protected int resolveLabel(LabelNode label) {
   if (labels.containsKey(label)) {
     return labels.get(label);
   } else {
     int newLabelIndex = labels.size() + 1;
     labels.put(label, newLabelIndex);
     return newLabelIndex;
   }
 }
  public LabelNode getOrCreateGotoLabel(String name) {
    name = name.toLowerCase();
    if (gotoLabels == null) gotoLabels = new HashMap<String, LabelNode>();

    LabelNode label = gotoLabels.get(name);
    if (label == null) gotoLabels.put(name, label = new LabelNode());

    return label;
  }
 public LocalVariable getLocalVariable(String variable) {
   return localVariables.get(variable);
 }
 public LabelNode getGotoLabel(String name) {
   return gotoLabels == null ? null : gotoLabels.get(name.toLowerCase());
 }