Port optimization of comparison with a trivial LHS from ia32 to x64.
Review URL: http://codereview.chromium.org/2868028 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
d0a9f76261
commit
667c5e84a1
@ -3855,8 +3855,17 @@ void CodeGenerator::VisitCompareOperation(CompareOperation* node) {
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
if (left->IsTrivial()) {
|
||||
Load(right);
|
||||
Result right_result = frame_->Pop();
|
||||
frame_->Push(left);
|
||||
frame_->Push(&right_result);
|
||||
} else {
|
||||
Load(left);
|
||||
Load(right);
|
||||
}
|
||||
|
||||
Comparison(node, cc, strict, destination());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user