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

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

Issue 2843049: Simplify the transitions in the Binary Op ICs. Now a single call... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 5 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
Index: src/x64/codegen-x64.cc
===================================================================
--- src/x64/codegen-x64.cc (revision 5022)
+++ src/x64/codegen-x64.cc (working copy)
@@ -10611,6 +10611,7 @@
// the four basic operations. The stub stays in the DEFAULT state
// forever for all other operations (also if smi code is skipped).
GenerateTypeTransition(masm);
+ break;
}
Label not_floats;
@@ -10928,31 +10929,13 @@
void GenericBinaryOpStub::GenerateTypeTransition(MacroAssembler* masm) {
Label get_result;
- // Keep a copy of operands on the stack and make sure they are also in
- // rdx, rax.
+ // Ensure the operands are on the stack.
if (HasArgsInRegisters()) {
GenerateRegisterArgsPush(masm);
- } else {
- GenerateLoadArguments(masm);
}
- // Internal frame is necessary to handle exceptions properly.
- __ EnterInternalFrame();
-
- // Push arguments on stack if the stub expects them there.
- if (!HasArgsInRegisters()) {
- __ push(rdx);
- __ push(rax);
- }
- // Call the stub proper to get the result in rax.
- __ call(&get_result);
- __ LeaveInternalFrame();
-
// Left and right arguments are already on stack.
- __ pop(rcx);
- // Push the operation result. The tail call to BinaryOp_Patch will
- // return it to the original caller..
- __ push(rax);
+ __ pop(rcx); // Save the return address.
// Push this stub's key.
__ Push(Smi::FromInt(MinorKey()));
@@ -10963,17 +10946,13 @@
__ Push(Smi::FromInt(runtime_operands_type_));
- __ push(rcx);
+ __ push(rcx); // The return address.
// Perform patching to an appropriate fast case and return the result.
__ TailCallExternalReference(
ExternalReference(IC_Utility(IC::kBinaryOp_Patch)),
- 6,
+ 5,
1);
-
- // The entry point for the result calculation is assumed to be immediately
- // after this sequence.
- __ bind(&get_result);
}

Powered by Google App Engine
This is Rietveld 408576698