.get(i*2+1); childChunks[i] = new Chunk(start, end); Chunk mergedChunk = (Chunk)mergedChildChunks.get(i); int mergedSize = mergedChunk.getChunkSize();
if (!chunks[i-1].isAdjacentTo(chunks[i])) { int lengthOfRun = i - startOfCurrentRun; mergeSize = mergeSize + chunks[j].getChunkSize(); new Chunk(chunks[mergeStart].getChunkStart(), chunks[mergeEnd].getChunkEnd()));
.get(i*2+1); childChunks[i] = new Chunk(start, end); Chunk mergedChunk = (Chunk)mergedChildChunks.get(i); int mergedSize = mergedChunk.getChunkSize();
.get(i*2+1); childChunks[i] = new Chunk(start, end); Chunk mergedChunk = (Chunk)mergedChildChunks.get(i); int mergedSize = mergedChunk.getChunkSize();
.get(i*2+1); childChunks[i] = new Chunk(start, end); Chunk mergedChunk = (Chunk)mergedChildChunks.get(i); int mergedSize = mergedChunk.getChunkSize();
if (!chunks[i-1].isAdjacentTo(chunks[i])) { int lengthOfRun = i - startOfCurrentRun; mergeSize = mergeSize + chunks[j].getChunkSize(); new Chunk(chunks[mergeStart].getChunkStart(), chunks[mergeEnd].getChunkEnd()));
if (!chunks[i-1].isAdjacentTo(chunks[i])) { int lengthOfRun = i - startOfCurrentRun; mergeSize = mergeSize + chunks[j].getChunkSize(); new Chunk(chunks[mergeStart].getChunkStart(), chunks[mergeEnd].getChunkEnd()));
if (!chunks[i-1].isAdjacentTo(chunks[i])) { int lengthOfRun = i - startOfCurrentRun; mergeSize = mergeSize + chunks[j].getChunkSize(); new Chunk(chunks[mergeStart].getChunkStart(), chunks[mergeEnd].getChunkEnd()));
Chunk chunkToOutline = (Chunk)candidateChunks.get(i); methodsOutlined.add(outline(chunkToOutline.getChunkStart(), chunkToOutline.getChunkEnd(), originalMethodName + "$outline$" + outlinedCount,
Chunk chunkToOutline = (Chunk)candidateChunks.get(i); methodsOutlined.add(outline(chunkToOutline.getChunkStart(), chunkToOutline.getChunkEnd(), originalMethodName + "$outline$" + outlinedCount,
Chunk chunkToOutline = (Chunk)candidateChunks.get(i); methodsOutlined.add(outline(chunkToOutline.getChunkStart(), chunkToOutline.getChunkEnd(), originalMethodName + "$outline$" + outlinedCount,
/** * Implements the <code>java.util.Comparable.compareTo(Object)</code> * method. * @return * <ul> * <li>A positive <code>int</code> if the length of <code>this</code> * chunk in bytes is greater than that of <code>comparand</code></li> * <li>A negative <code>int</code> if the length of <code>this</code> * chunk in bytes is less than that of <code>comparand</code></li> * <li>Zero, otherwise.</li> * </ul> */ public int compareTo(Object comparand) { return getChunkSize() - ((Chunk)comparand).getChunkSize(); } }
/** * Implements the <code>java.util.Comparable.compareTo(Object)</code> * method. * @return * <ul> * <li>A positive <code>int</code> if the length of <code>this</code> * chunk in bytes is greater than that of <code>comparand</code></li> * <li>A negative <code>int</code> if the length of <code>this</code> * chunk in bytes is less than that of <code>comparand</code></li> * <li>Zero, otherwise.</li> * </ul> */ public int compareTo(Object comparand) { return getChunkSize() - ((Chunk)comparand).getChunkSize(); } }
/** * Determines whether this outlineable {@link MethodGenerator.Chunk} is * followed immediately by the argument * <code>MethodGenerator.Chunk</code>, with no other intervening * instructions, including {@link OutlineableChunkStart} or * {@link OutlineableChunkEnd} instructions. * @param neighbour an outlineable {@link MethodGenerator.Chunk} * @return <code>true</code> if and only if the argument chunk * immediately follows <code>this</code> chunk */ boolean isAdjacentTo(Chunk neighbour) { return getChunkEnd().getNext() == neighbour.getChunkStart(); }
/** * Determines whether this outlineable {@link MethodGenerator.Chunk} is * followed immediately by the argument * <code>MethodGenerator.Chunk</code>, with no other intervening * instructions, including {@link OutlineableChunkStart} or * {@link OutlineableChunkEnd} instructions. * @param neighbour an outlineable {@link MethodGenerator.Chunk} * @return <code>true</code> if and only if the argument chunk * immediately follows <code>this</code> chunk */ boolean isAdjacentTo(Chunk neighbour) { return getChunkEnd().getNext() == neighbour.getChunkStart(); }
/** * Implements the <code>java.util.Comparable.compareTo(Object)</code> * method. * @return * <ul> * <li>A positive <code>int</code> if the length of <code>this</code> * chunk in bytes is greater than that of <code>comparand</code></li> * <li>A negative <code>int</code> if the length of <code>this</code> * chunk in bytes is less than that of <code>comparand</code></li> * <li>Zero, otherwise.</li> * </ul> */ public int compareTo(Object comparand) { return getChunkSize() - ((Chunk)comparand).getChunkSize(); } }
/** * Determines whether this outlineable {@link MethodGenerator.Chunk} is * followed immediately by the argument * <code>MethodGenerator.Chunk</code>, with no other intervening * instructions, including {@link OutlineableChunkStart} or * {@link OutlineableChunkEnd} instructions. * @param neighbour an outlineable {@link MethodGenerator.Chunk} * @return <code>true</code> if and only if the argument chunk * immediately follows <code>this</code> chunk */ boolean isAdjacentTo(Chunk neighbour) { return getChunkEnd().getNext() == neighbour.getChunkStart(); }
Chunk chunkToOutline = (Chunk)candidateChunks.get(i); methodsOutlined.add(outline(chunkToOutline.getChunkStart(), chunkToOutline.getChunkEnd(), originalMethodName + "$outline$" + outlinedCount,
/** * Implements the <code>java.util.Comparable.compareTo(Object)</code> * method. * @return * <ul> * <li>A positive <code>int</code> if the length of <code>this</code> * chunk in bytes is greater than that of <code>comparand</code></li> * <li>A negative <code>int</code> if the length of <code>this</code> * chunk in bytes is less than that of <code>comparand</code></li> * <li>Zero, otherwise.</li> * </ul> */ public int compareTo(Object comparand) { return getChunkSize() - ((Chunk)comparand).getChunkSize(); } }
/** * Determines whether this outlineable {@link MethodGenerator.Chunk} is * followed immediately by the argument * <code>MethodGenerator.Chunk</code>, with no other intervening * instructions, including {@link OutlineableChunkStart} or * {@link OutlineableChunkEnd} instructions. * @param neighbour an outlineable {@link MethodGenerator.Chunk} * @return <code>true</code> if and only if the argument chunk * immediately follows <code>this</code> chunk */ boolean isAdjacentTo(Chunk neighbour) { return getChunkEnd().getNext() == neighbour.getChunkStart(); }