<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Overall, my recommendation would be to split this into three patches: the first patch would just increase the abstraction level of the bitcode reader, by adding various predicates that you need and tidy things up.  The second would extend MemoryObject as needed to add the functionality that you need.  The third would actually switch the meat of the bitcode reader to be lazy-streaming, and switch a tool to use it.<br>
<font color="#888888"><br></font></blockquote><div><br></div><div><br></div><div>Attached is patch 1 as listed above: a refactor of BistreamCursor to use an offset rather than raw pointers, and abstract the relevant operations into functions. For now BitstreamReader is the same. I've tested it locally and it works in isolation and is hopefully ready to apply. Patch 2, a subclass of MemoryObject (StreamableMemoryObject) to replace the BitstreamBytes class here, is upcoming next.</div>
<div><br></div><div>thanks,</div><div>-Derek</div></div>