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

Unified Diff: src/ia32/codegen-ia32.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/ia32/codegen-ia32.cc
===================================================================
--- src/ia32/codegen-ia32.cc (revision 5022)
+++ src/ia32/codegen-ia32.cc (working copy)
@@ -9866,6 +9866,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;
@@ -10213,51 +10214,28 @@
void GenericBinaryOpStub::GenerateTypeTransition(MacroAssembler* masm) {
- Label get_result;
-
- // Keep a copy of operands on the stack and make sure they are also in
- // edx, eax.
+ // Ensure the operands are on the stack.
if (HasArgsInRegisters()) {
GenerateRegisterArgsPush(masm);
- } else {
- GenerateLoadArguments(masm);
}
- // Internal frame is necessary to handle exceptions properly.
- __ EnterInternalFrame();
+ __ pop(ecx); // Save return address.
- // Push arguments on stack if the stub expects them there.
- if (!HasArgsInRegisters()) {
- __ push(edx);
- __ push(eax);
- }
- // Call the stub proper to get the result in eax.
- __ call(&get_result);
- __ LeaveInternalFrame();
-
- __ pop(ecx); // Return address.
// Left and right arguments are now on top.
- // Push the operation result. The tail call to BinaryOp_Patch will
- // return it to the original caller.
- __ push(eax);
// Push this stub's key. Although the operation and the type info are
// encoded into the key, the encoding is opaque, so push them too.
__ push(Immediate(Smi::FromInt(MinorKey())));
__ push(Immediate(Smi::FromInt(op_)));
__ push(Immediate(Smi::FromInt(runtime_operands_type_)));
- __ push(ecx); // Return address.
+ __ push(ecx); // Push return address.
- // Patch the caller to an appropriate specialized stub
- // and return the operation result.
+ // Patch the caller to an appropriate specialized stub and return the
Kasper Lund 2010/07/06 11:56:35 I guess it doesn't really return anymore? Does it?
Erik Corry 2010/07/06 12:53:21 Well it's a tail call so it returns the answer to
+ // operation 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