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()); |
} |