<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 28, 2016, at 6:00 PM, Peter Collingbourne <<a href="mailto:peter@pcc.me.uk" class="">peter@pcc.me.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi all,<div class=""><br class=""></div><div class="">This is about <a href="https://reviews.llvm.org/D26100" class="">https://reviews.llvm.org/D26100</a></div><div class=""><br class=""></div><div class="">That change moves the block info block state from BitstreamReader to BitstreamCursor in order to accommodate multiple block info blocks (the idea is that the cursor would store the block info block state for whichever block info block is active for that cursor).</div><div class=""><br class=""></div><div class="">Duncan objected to it on the grounds that we should aim for a design that would continue to allow a shared block info block state. I'd agree with him that such a design would be possible while still allowing multiple block info blocks; the design I have in mind would decouple the block info state from not only the cursor but the reader. The interface would look like this:</div><div class=""><br class=""></div><div class="">class BitstreamBlockInfo {</div><div class=""> // block info block state, i.e. everything matching *BlockInfo* in the current BitstreamReader interface</div><div class="">};</div><div class=""><br class=""></div><div class="">class BitstreamCursor : SimpleBitstreamCursor {</div><div class=""> // existing BitstreamCursor interface here</div><div class=""><br class=""></div><div class=""> /// Read a block info block into a BitstreamBlockInfo object, and return it.</div><div class=""> BitstreamBlockInfo ReadBlockInfo();</div><div class=""><br class=""></div><div class=""> /// Set the block info to be used by this BitstreamCursor to interpret abbreviated records.</div><div class=""> void setBlockInfo(BitstreamBlockInfo *Info);</div><div class="">};</div><div class=""><br class=""></div><div class="">What I like about this design is that it is more explicit than either the status quo or D26100, but I'd like feedback on it first.</div></div></div></blockquote><div><br class=""></div></div>That’s fine with me.<div class=""><br class=""></div><div class="">— </div><div class="">Mehdi</div><div class=""><br class=""></div></body></html>