From: bmeurer@chromium.org Date: Mon, 14 Oct 2013 09:22:34 +0000 (+0000) Subject: Drop useless HForceRepresentation in BinaryOpStub. X-Git-Tag: upstream/4.7.83~12108 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9724f06211307f0f9c4c2d2e47a1eb826872af6e;p=platform%2Fupstream%2Fv8.git Drop useless HForceRepresentation in BinaryOpStub. R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/27167002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc index c9529a8..f8fde15 100644 --- a/src/code-stubs-hydrogen.cc +++ b/src/code-stubs-hydrogen.cc @@ -932,17 +932,15 @@ HValue* CodeStubGraphBuilder::BuildCodeInitializedStub() { result = EnforceNumberType(result, result_type); } - // Reuse the double box if we are allowed to (i.e. chained binops). + // Reuse the double box of one of the operands if we are allowed to (i.e. + // chained binops). if (stub->CanReuseDoubleBox()) { - HValue* reuse = (stub->mode() == OVERWRITE_LEFT) ? left : right; + HValue* operand = (stub->mode() == OVERWRITE_LEFT) ? left : right; IfBuilder if_heap_number(this); - if_heap_number.IfNot(reuse); + if_heap_number.IfNot(operand); if_heap_number.Then(); - HValue* res_val = Add(result, - Representation::Double()); - HObjectAccess access = HObjectAccess::ForHeapNumberValue(); - Add(reuse, access, res_val); - Push(reuse); + Add(operand, HObjectAccess::ForHeapNumberValue(), result); + Push(operand); if_heap_number.Else(); Push(result); if_heap_number.End();