Late DBC...
https://codereview.chromium.org/146623007/diff/40001/src/hydrogen.cc
File src/hydrogen.cc (right):
https://codereview.chromium.org/146623007/diff/40001/src/hydrogen.cc#newcode6177
src/hydrogen.cc:6177: } else {
On 2014/02/10 15:01:29, tfarina wrote:
no 'else' after return.
Although I am a big fan of "comb-like" control flow, where you simply
chain together ifs with early returns for special cases without nesting
them (humans are *very* bad at mentally following nested things), this
would be a wrong place for using it IMHO: Returning early for LOAD would
make it look like a special case, which it isn't.
you can also use a ternay operator here:
return (access_type == LOAD) ? New<...>(...) : New<...>(...);
Nope, both "branches" of a ternary have to be of the same type,
inheritance doesn't work here as one would expect. Having said that, I
normally prefer ternaries very much, but only when possible. ;-)
https://codereview.chromium.org/146623007/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.