https://codereview.chromium.org/11547015/diff/4010/src/deoptimizer.h File src/deoptimizer.h (right):
https://codereview.chromium.org/11547015/diff/4010/src/deoptimizer.h#newcode90 src/deoptimizer.h:90: class OptimizedFunctionFilter BASE_EMBEDDED { On 2012/12/12 14:31:48, Sven Panne wrote:
This is what is commonly called a predicate (even in STL ;-), and it
might be
nicer to move this in a templatized version to utils.h. Perhaps we
should even
add a unary_function template there from which can subclass. OptimizedFunctionFilter can be a typedef if it is needed at all then.
Anyway, overloading function invocation (i.e. operator()) seems to be
more
natural than making up a name like TakeFunction.
I am fine with both solutions (a templetized filter/predicate or a type-specific filter). Given that we already have several of these home-grown filters (e.g. HeapObjectsFilter) I have no problem with adding another one. Having one templetized class is also fine with me. My opinion is not strong enough to sway either way. https://codereview.chromium.org/11547015/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
