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

Unified Diff: src/x64/codegen-x64.cc

Issue 2868028: Port optimization of comparison with a trivial LHS from ia32 to x64. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 6 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/x64/codegen-x64.cc
===================================================================
--- src/x64/codegen-x64.cc (revision 4928)
+++ src/x64/codegen-x64.cc (working copy)
@@ -3855,8 +3855,17 @@
default:
UNREACHABLE();
}
- Load(left);
- Load(right);
+
+ if (left->IsTrivial()) {
+ Load(right);
+ Result right_result = frame_->Pop();
+ frame_->Push(left);
+ frame_->Push(&right_result);
Lasse Reichstein 2010/06/24 08:59:48 Could we reverse the comparison instead, and keep
William Hesse 2010/06/24 14:43:53 I don't think so, because the ToNumber calls insid
+ } else {
+ Load(left);
+ Load(right);
+ }
+
Comparison(node, cc, strict, destination());
}
« 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