MCPcopy Create free account
hub / github.com/beanshell/beanshell / addReference

Method addReference

src/bsh/org/objectweb/asm/Label.java:202–216  ·  view source on GitHub ↗

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 offset of the reference can be, and must be, computed and stored directly. @param sourcePosition the position of the refere

(
    final int sourcePosition,
    final int referencePosition)

Source from the content-addressed store, hash-verified

200 */
201
202 private void addReference (
203 final int sourcePosition,
204 final int referencePosition)
205 {
206 if (srcAndRefPositions == null) {
207 srcAndRefPositions = new int[6];
208 }
209 if (referenceCount >= srcAndRefPositions.length) {
210 int[] a = new int[srcAndRefPositions.length + 6];
211 System.arraycopy(srcAndRefPositions, 0, a, 0, srcAndRefPositions.length);
212 srcAndRefPositions = a;
213 }
214 srcAndRefPositions[referenceCount++] = sourcePosition;
215 srcAndRefPositions[referenceCount++] = referencePosition;
216 }
217
218 /**
219 * Resolves all forward references to this label. This method must be called

Callers 1

putMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected