Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: src/code-stubs-hydrogen.cc

Issue 27167002: Drop useless HForceRepresentation in BinaryOpStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index c9529a8de869d5e622d87a1c555e2512d5fcbe71..f8fde15895ac12a2c8c737ab8e13172f86036788 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -932,17 +932,15 @@ HValue* CodeStubGraphBuilder<BinaryOpStub>::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<HIsSmiAndBranch>(reuse);
+ if_heap_number.IfNot<HIsSmiAndBranch>(operand);
if_heap_number.Then();
- HValue* res_val = Add<HForceRepresentation>(result,
- Representation::Double());
- HObjectAccess access = HObjectAccess::ForHeapNumberValue();
- Add<HStoreNamedField>(reuse, access, res_val);
- Push(reuse);
+ Add<HStoreNamedField>(operand, HObjectAccess::ForHeapNumberValue(), result);
+ Push(operand);
if_heap_number.Else();
Push(result);
if_heap_number.End();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698