This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/4] Add an abstract incremental hash data type
- From: Andi Kleen <ak at linux dot intel dot com>
- To: Richard Biener <richard dot guenther at gmail 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 07:27:43 -0700
- 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>
> 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 base-class
> you inherit from).
Just change the inchash.h include file. The point was to only
change a single place.
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)
-Andi