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;
   }
 }
Esempio n. 2
0
  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;
  }
Esempio n. 3
0
 public LocalVariable getLocalVariable(String variable) {
   return localVariables.get(variable);
 }
Esempio n. 4
0
 public LabelNode getGotoLabel(String name) {
   return gotoLabels == null ? null : gotoLabels.get(name.toLowerCase());
 }