https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.cc
File src/compiler/register-allocator.cc (right):
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.cc#newcode1302
src/compiler/register-allocator.cc:1302: LiveRangeBound* Find(const
LifetimePosition position) {
Could not we use std::lower_bound for this?
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.cc#newcode1310
src/compiler/register-allocator.cc:1310: DCHECK(right_index !=
current_index);
How about DCHECK(right_index > current_index)?
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.cc#newcode1316
src/compiler/register-allocator.cc:1316: left_index = right_index;
I think this degenerate case would not appear if you calculated
current_index = left_index + (right_index + 1 - left_index) / 2;
(or if your right_index was exclusive).
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.cc#newcode1361
src/compiler/register-allocator.cc:1361: bool SetCurrent(int
operand_index) {
Maybe this could return the LiveRangeBound pointer so that there is not
this funny 'current_' state in this class (then it is basically just a
cache for the bound arrays).
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.cc#newcode1363
src/compiler/register-allocator.cc:1363: // TODO(dcarney): can this
happen at this point?
Yeah, just DCHECK here that the things that should not happen do not
happen.
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.h
File src/compiler/register-allocator.h (right):
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.h#newcode354
src/compiler/register-allocator.h:354: Zone* zone() const { return
zone_; }
Since you already touching this, could you possibly rename to
local_zone()?
https://codereview.chromium.org/694473002/
--
--
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.