示例#1
0
  int contains(BytecodeBuffer b, int start, int end) {
    key.clear();
    key.b = b;
    key.start = start;
    key.end = end;
    key.hash = 0;
    key.init();

    Integer index = (Integer) map.get(key);
    return (index != null) ? index.intValue() : -1;
  }
示例#2
0
  int store(BytecodeBuffer b, int start, int end) {
    ByteArray a = wrappers.isEmpty() ? null : (ByteArray) wrappers.pop();

    if (a == null) {
      a = newByteArray();
    }

    a.clear();
    a.b = b;
    a.start = start;
    a.end = end;
    a.init();

    Integer index = IntegerPool.getNumber(map.size() + 1);
    map.put(a, index);

    return index.intValue();
  }