On 2015/01/22 12:15:29, Michael Starzinger wrote:
LGTM. But I have to say I am not a huge fan of the "auto" proliferation
everywhere. Is it really necessary? Does it really improve the situation?
https://codereview.chromium.org/864293002/diff/1/src/compiler/graph-visualizer.cc
File src/compiler/graph-visualizer.cc (right):
https://codereview.chromium.org/864293002/diff/1/src/compiler/graph-visualizer.cc#newcode573
src/compiler/graph-visualizer.cc:573: for (auto predecessor :
current->predecessors()) {
remark: I know you all like the "auto" magic, but I would find "BasicBlock
predecessor" more readable. Just putting it out there, feel free to
ignore me
in
this regard. :)
https://codereview.chromium.org/864293002/diff/1/src/compiler/scheduler.cc
File src/compiler/scheduler.cc (right):
https://codereview.chromium.org/864293002/diff/1/src/compiler/scheduler.cc#newcode1035
src/compiler/scheduler.cc:1035: auto pred = block->predecessors().begin();
remark: Especially here, I have to think hard to figure out that "pred"
is a
BasicBlock here. :/
As per in-person discussion, my feeling on the auto is to only use it where
it
is obvious from context what the type is:
for (auto block : x->blocks()) // clearly a Block of some kind
for (auto instr : x->instructions()) // clearly an Instruction of some kind
for (auto b : x->predecessors()) // less clear, better to make it explicit
for (BasicBlock* b : x->predecessors()) // now clear
https://codereview.chromium.org/864293002/
--
--
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/d/optout.