https://codereview.chromium.org/23609020/diff/1/src/hydrogen.h
File src/hydrogen.h (right):

https://codereview.chromium.org/23609020/diff/1/src/hydrogen.h#newcode2309
src/hydrogen.h:2309: class HUnique V8_FINAL {
I think this should live somewhere else (e.g. handles.h or perhaps its
own file), and be named Unique, since it isn't really specific to
Hydrogen.

https://codereview.chromium.org/23609020/diff/1/src/hydrogen.h#newcode2384
src/hydrogen.h:2384: for (int j = size_ - 1; j >= i; j--) {
Could it be worth using memmove here?

https://codereview.chromium.org/23609020/diff/1/src/hydrogen.h#newcode2412
src/hydrogen.h:2412: bool found = false;
The rest of this for-loop could be simplified to:

while (j < that->size_ && sought != that->array_[j]) j++;
if (j == that->size_) return false;

https://codereview.chromium.org/23609020/diff/1/src/hydrogen.h#newcode2429
src/hydrogen.h:2429: out->Grow(this->size_ > that->size_ ? this->size_ :
that->size_, zone);
Nit: Min(...)

https://codereview.chromium.org/23609020/diff/1/src/hydrogen.h#newcode2434
src/hydrogen.h:2434: if (j >= that->size_) break;  // Right has been
exhausted.
Why not simply

while (i < this->size && j < that->size_)

https://codereview.chromium.org/23609020/diff/1/src/hydrogen.h#newcode2462
src/hydrogen.h:2462: for (;;) {
Same here:

while (i < this->size && j < that->size_)

and then simply process the rests after the loop:

while (j < that->size_) out->array_[k++] = that->array_[j++];
while (i < this->size_) out->array_[k++] = this->array_[i++];

https://codereview.chromium.org/23609020/diff/1/src/hydrogen.h#newcode2518
src/hydrogen.h:2518: int new_capacity = capacity_ + capacity_ + size;
// 2*current + needed
That seems like a lot, and can cause up to a 200% space overhead. What's
the rationale?

https://codereview.chromium.org/23609020/

--
--
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.

Reply via email to