Hi Chris & Nick,<div>Attached is a very slightly updated version of patch number 1, and patch number 2, with a new StreamableMemoryObject (derived from MemoryObject), suitable for streaming usage.</div><div>One consequence of deriving from MemoryObject is that I had to make the getExtent and readByte/readBytes methods of MemoryObject no longer const, since they are definitely not const in the StreamableMemoryObject. This resulted in having to remove const in several usages of MemoryObject. It seemed less bad than adding a bunch of mutable data members in StreamableMemoryObject or creating a near-duplicate of MemoryObject.</div>
<div><br>The third patch is nearly ready as well, please let me know what you think.</div><div>thanks,</div><div>-Derek<br><br><div class="gmail_quote">On Thu, Jan 12, 2012 at 3:09 PM, Derek Schuff <span dir="ltr"><<a href="mailto:dschuff@google.com">dschuff@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div class="im"><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><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>
</blockquote></div><br></div>