This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 1/4] Add an abstract incremental hash data type
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Andi Kleen <ak at linux dot intel dot com>
- Cc: Trevor Saunders <tsaunders at mozilla dot com>,Andi Kleen <andi at firstfloor dot org>,GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 23 Jul 2014 20:00:35 +0200
- Subject: Re: [PATCH 1/4] Add an abstract incremental hash data type
- Authentication-results: sourceware.org; auth=none
- References: <1405488709-12677-1-git-send-email-andi at firstfloor dot org> <1405488709-12677-2-git-send-email-andi at firstfloor dot org> <20140717024053 dot GA23343 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <20140717043631 dot GD18735 at two dot firstfloor dot org> <20140718010852 dot GA8100 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <CAFiYyc2-tD3DLb9VMYBWdQQhYb9Gjzsc1EwaDgy1eKA-Q8droQ at mail dot gmail dot com> <20140723142743 dot GV5803 at tassilo dot jf dot intel dot com>
On July 23, 2014 4:27:43 PM CEST, Andi Kleen <email@example.com> wrote:
>> Btw, what will be the way to plug in an alternative hash function?
>> That is, there doesn't seem to be a separation of interface
>> and implementation in your patch (like with a template or a
>> you inherit from).
>Just change the inchash.h include file. The point was to only
>change a single place.
So there will be at most one hash implementation? Maybe use a namespace instead of a hash then?
So other places can extend it?
Why didn't you replace the tree.c uses BTW?
>Inheritance would need changing everything again for the new type
>(unless we came up with hash factories that would likely defeat
>virtualization and would be over engineering)