|
|
DescriptionConstant-fold strings in HGraphBuilder::BuildBinaryOperation.
R=vegorov@chromium.org
BUG=v8:3325
LOG=N
Committed: https://crrev.com/40ebcea1138c0c7af4329ea309c1085238d73409
Cr-Commit-Position: refs/heads/master@{#26782}
Patch Set 1 #
Total comments: 1
Patch Set 2 : addressed comment #
Total comments: 2
Patch Set 3 : update #
Total comments: 1
Patch Set 4 : argh #Messages
Total messages: 23 (8 generated)
vegorov@google.com changed reviewers: + vegorov@google.com
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()) { .. }
New patchsets have been uploaded after l-g-t-m from vegorov@google.com
The CQ bit was checked by yangguo@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/935393002/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_linux_nodcheck_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel/build...)
I think when I was copy pasting code for my comment I did it super wrong :) https://codereview.chromium.org/935393002/diff/20001/src/hydrogen.cc File src/hydrogen.cc (right): https://codereview.chromium.org/935393002/diff/20001/src/hydrogen.cc#newcode1... src/hydrogen.cc:10494: ? HConstant::cast(right)->StringValue() should be left here. https://codereview.chromium.org/935393002/diff/20001/src/hydrogen.cc#newcode1... src/hydrogen.cc:10497: left->IsConstant() && HConstant::cast(left)->HasStringValue() should be right-> here.
On 2015/02/20 14:54:05, Vyacheslav Egorov (Google) wrote: > I think when I was copy pasting code for my comment I did it super wrong :) > > https://codereview.chromium.org/935393002/diff/20001/src/hydrogen.cc > File src/hydrogen.cc (right): > > https://codereview.chromium.org/935393002/diff/20001/src/hydrogen.cc#newcode1... > src/hydrogen.cc:10494: ? HConstant::cast(right)->StringValue() > should be left here. > > https://codereview.chromium.org/935393002/diff/20001/src/hydrogen.cc#newcode1... > src/hydrogen.cc:10497: left->IsConstant() && > HConstant::cast(left)->HasStringValue() > should be right-> here. I should have double checked :)
The CQ bit was checked by yangguo@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/935393002/40001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_linux_nodcheck_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel/build...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_linux_nodcheck_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel/build...)
https://codereview.chromium.org/935393002/diff/40001/src/hydrogen.cc File src/hydrogen.cc (right): https://codereview.chromium.org/935393002/diff/40001/src/hydrogen.cc#newcode1... src/hydrogen.cc:10497: left->IsConstant() && HConstant::cast(right)->HasStringValue() one left is still here :)
The CQ bit was checked by yangguo@chromium.org
On 2015/02/20 15:10:17, Vyacheslav Egorov (Google) wrote: > https://codereview.chromium.org/935393002/diff/40001/src/hydrogen.cc > File src/hydrogen.cc (right): > > https://codereview.chromium.org/935393002/diff/40001/src/hydrogen.cc#newcode1... > src/hydrogen.cc:10497: left->IsConstant() && > HConstant::cast(right)->HasStringValue() > one left is still here :) argh. copy paste is evil.
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/935393002/60001
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/40ebcea1138c0c7af4329ea309c1085238d73409 Cr-Commit-Position: refs/heads/master@{#26782} |