private void addForwardReference ( final int sourceInsnBytecodeOffset , final int referenceType , final int referenceHandle ) { if ( forwardReferences == null ) { forwardReferences = new int [ FORWARD_REFERENCES_CAPACITY_INCREMENT ] ; } int lastElementIndex = forwardReferences [ 0 ] ; if ( lastElementIndex + 2 >= forwardReferences . length ) { int [ ] newValues = new int [ forwardReferences . length + FORWARD_REFERENCES_CAPACITY_INCREMENT ] ; System . arraycopy ( forwardReferences , 0 , newValues , 0 , forwardReferences . length ) ; forwardReferences = newValues ; } forwardReferences [ ++ lastElementIndex ] = sourceInsnBytecodeOffset ; forwardReferences [ ++ lastElementIndex ] = referenceType | referenceHandle ; forwardReferences [ 0 ] = lastElementIndex ; }
Adds a forward reference to this label . This method must be called only for a true forward reference i . e . only if this label is not resolved yet . For backward references the relative bytecode offset of the reference can be and must be computed and stored directly .