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

Unified Diff: src/x64/stub-cache-x64.cc

Issue 519035: Use cmov instructions to avoid some conditional branches in stub code.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 12 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/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/stub-cache-x64.cc
===================================================================
--- src/x64/stub-cache-x64.cc (revision 3528)
+++ src/x64/stub-cache-x64.cc (working copy)
@@ -1827,17 +1827,15 @@
// depending on the this.x = ...; assignment in the function.
for (int i = 0; i < shared->this_property_assignments_count(); i++) {
if (shared->IsThisPropertyAssignmentArgument(i)) {
- Label not_passed;
- // Set the property to undefined.
- __ movq(Operand(r9, i * kPointerSize), r8);
// Check if the argument assigned to the property is actually passed.
+ // If argument is not passed the property is set to undefined,
+ // otherwise find it on the stack.
int arg_number = shared->GetThisPropertyAssignmentArgument(i);
+ __ movq(rbx, r8);
__ cmpq(rax, Immediate(arg_number));
- __ j(below_equal, &not_passed);
- // Argument passed - find it on the stack.
- __ movq(rbx, Operand(rcx, arg_number * -kPointerSize));
+ __ cmovq(above, rbx, Operand(rcx, arg_number * -kPointerSize));
+ // Store value in the property.
__ movq(Operand(r9, i * kPointerSize), rbx);
- __ bind(&not_passed);
} else {
// Set the property to the constant value.
Handle<Object> constant(shared->GetThisPropertyAssignmentConstant(i));
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698