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

Unified Diff: src/full-codegen.cc

Issue 6592064: Make the materialization of smi constants consistent between the two compiler... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 10 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 | « src/full-codegen.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.cc
===================================================================
--- src/full-codegen.cc (revision 6981)
+++ src/full-codegen.cc (working copy)
@@ -739,25 +739,13 @@
case Token::SHL:
case Token::SHR:
case Token::SAR: {
- // Figure out if either of the operands is a constant.
- ConstantOperand constant = ShouldInlineSmiCase(op)
- ? GetConstantOperand(op, left, right)
- : kNoConstants;
+ // Load both operands.
+ VisitForStackValue(left);
+ VisitForAccumulatorValue(right);
- // Load only the operands that we need to materialize.
- if (constant == kNoConstants) {
- VisitForStackValue(left);
- VisitForAccumulatorValue(right);
- } else if (constant == kRightConstant) {
- VisitForAccumulatorValue(left);
- } else {
- ASSERT(constant == kLeftConstant);
- VisitForAccumulatorValue(right);
- }
-
SetSourcePosition(expr->position());
if (ShouldInlineSmiCase(op)) {
- EmitInlineSmiBinaryOp(expr, op, mode, left, right, constant);
+ EmitInlineSmiBinaryOp(expr, op, mode, left, right);
} else {
EmitBinaryOp(op, mode);
}
« no previous file with comments | « src/full-codegen.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698