public void iterateFields(OopVisitor visitor, boolean doVMFields) {
   super.iterateFields(visitor, doVMFields);
   if (doVMFields) {
     visitor.doOop(constants, true);
     for (int i = 0; i < getLength(); i++) {
       ConstantPoolCacheEntry entry = getEntryAt(i);
       entry.iterateFields(visitor);
     }
   }
 }
Example #2
0
 public void iterateFields(OopVisitor visitor, boolean doVMFields) {
   super.iterateFields(visitor, doVMFields);
   if (doVMFields) {
     visitor.doOop(constMethod, true);
     visitor.doOop(constants, true);
     visitor.doCInt(methodSize, true);
     visitor.doCInt(maxStack, true);
     visitor.doCInt(maxLocals, true);
     visitor.doCInt(sizeOfParameters, true);
     visitor.doCInt(accessFlags, true);
   }
 }
Example #3
0
 public void iterateFields(OopVisitor visitor, boolean doVMFields) {
   super.iterateFields(visitor, doVMFields);
 }
Example #4
0
  public void iterateFields(OopVisitor visitor, boolean doVMFields) {
    super.iterateFields(visitor, doVMFields);
    if (doVMFields) {
      visitor.doOop(tags, true);
      visitor.doOop(cache, true);
      visitor.doOop(poolHolder, true);

      final int length = (int) getLength();
      // zero'th pool entry is always invalid. ignore it.
      for (int index = 1; index < length; index++) {
        int ctag = (int) getTags().getByteAt((int) index);
        switch (ctag) {
          case JVM_CONSTANT_ClassIndex:
          case JVM_CONSTANT_StringIndex:
          case JVM_CONSTANT_Integer:
            visitor.doInt(
                new IntField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true),
                true);
            break;

          case JVM_CONSTANT_Float:
            visitor.doFloat(
                new FloatField(
                    new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true),
                true);
            break;

          case JVM_CONSTANT_Long:
            visitor.doLong(
                new LongField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true),
                true);
            // long entries occupy two slots
            index++;
            break;

          case JVM_CONSTANT_Double:
            visitor.doDouble(
                new DoubleField(
                    new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true),
                true);
            // double entries occupy two slots
            index++;
            break;

          case JVM_CONSTANT_UnresolvedClass:
          case JVM_CONSTANT_Class:
          case JVM_CONSTANT_UnresolvedString:
          case JVM_CONSTANT_Utf8:
            visitor.doOop(
                new OopField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true),
                true);
            break;

          case JVM_CONSTANT_Fieldref:
          case JVM_CONSTANT_Methodref:
          case JVM_CONSTANT_InterfaceMethodref:
          case JVM_CONSTANT_NameAndType:
            visitor.doInt(
                new IntField(new NamedFieldIdentifier(nameForTag(ctag)), indexOffset(index), true),
                true);
            break;
        }
      }
    }
    /*
    int length = getLength();
    for (int index = 0; index < length; index++) {
      long offset = baseOffset + (index + typeDataBase.getOopSize());
      visitor.doOop(new IndexableField(index, offset, false), getObjAt(index));
    }
    */
  }