[PATCH] OnDiskHashTable: Make the iterable version separate

Justin Bogner mail at justinbogner.com
Mon Apr 14 09:41:38 PDT 2014


I've clang-formatted and fixed up naming for the whole class in r206188,
and then applied this as r206189. Thanks!

Richard Smith <richard at metafoo.co.uk> writes:
> Please fix some pre-existing style issues in code you moved around /
> refactored: * on the right, variables start with a uppercase letter, functions
> start with a lowercase letter. Otherwise, LGTM.
>
> On Tue, Apr 8, 2014 at 1:15 PM, Justin Bogner <mail at justinbogner.com> wrote:
>
>     Currently the on disk hash table's key_iterator and data_iterator make
>     the assumption that the table data starts exactly four bytes after the
>     base of the table. This happens to be true for all of the tables we
>     currently iterate over, but not for all of the OnDiskHashTables we
>     currently use. For example, key_ and data_iterator would iterate over
>     meaningless data if they were used on the hash tables in PTHLexer.
>    
>     We can make the API safer by breaking this into two types. One doesn't
>     have the iterators, and the other must be told where the payload starts.
>    
>     The name I've chosen, OnDiskIterableHashTable, is a bit wordy, but I
>     couldn't think of anything better.
>    
>     Does this look okay to commit?
>
>     _______________________________________________
>     cfe-commits mailing list
>     cfe-commits at cs.uiuc.edu
>     http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list