LGTM

if it compiles and runs :)


https://codereview.chromium.org/935393002/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

https://codereview.chromium.org/935393002/diff/1/src/hydrogen.cc#newcode10502
src/hydrogen.cc:10502: if (left->IsConstant() &&
HConstant::cast(left)->HasStringValue() &&
Maybe have

Handle<String> left_string = left->IsConstant() &&
HConstant::cast(left)->HasStringValue() ?
HConstant::cast(right)->StringValue() : Handle<String>();
Handle<String> right_string = left->IsConstant() &&
HConstant::cast(left)->HasStringValue() ?
HConstant::cast(right)->StringValue() : Handle<String>();

then all three ifs can use it:

if (!left_string.is_null() && left_string->length() == 0) {
  ...
}

if (!right_string.is_null() && right_string->length() == 0) {
  ...
}

if (!left_string.is_null() && !right_string.is_null()) {
  ..
}

https://codereview.chromium.org/935393002/

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

Reply via email to