13.10.2014 Views

OPTIMIZING THE JAVA VIRTUAL MACHINE INSTRUCTION SET BY ...

OPTIMIZING THE JAVA VIRTUAL MACHINE INSTRUCTION SET BY ...

OPTIMIZING THE JAVA VIRTUAL MACHINE INSTRUCTION SET BY ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

149<br />

BlockList: A list of the bytecode sequences<br />

Prefix: A sequence of bytecodes<br />

Suffix: A sequence of bytecodes<br />

For each key k, in BlockCounts<br />

Add k to BlockList<br />

End for<br />

Sort BlockList into descending order by sequence length<br />

For each element, e, in BlockList<br />

If BlockCounts[e] > 0 and e contains BestSeq<br />

Count = BlockCounts[e]<br />

For each non-empty subsequence of e, e’<br />

BlockCounts[e’] -= Count<br />

End For<br />

Let Prefix hold all of the bytecodes in e before the occurrence<br />

of BestSeq<br />

Let Suffix hold all of the bytecodes in e after the occurrence<br />

of BestSeq<br />

For each non-empty subsequence of Prefix, p<br />

BlockCounts[p] += Count<br />

End For<br />

For each non-empty subsequence of Suffix, s<br />

BlockCounts[s] += Count<br />

End For<br />

End If<br />

End for<br />

Figure 7.5: An Algorithm for Updating the BlockCounts Data Structure to Prevent<br />

Overlapping Sequences from being Counted

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!