Reviewers: Kasper Lund,

Message:
I just set a breakpoint on the jump to next eliminator, and only found
these two cases ever get it.  If it makes the control flow too confusing
(the switch one is a big of a monster), I'm up for leaving it as is.
Leaving the jump to next optimization is simple, but I want to get rid
of the other stuff.

Description:
Remove two cases of needlessly jumping to the next instruction.  The
jump eliminator will remove these cases, but it's easy enough to just do
statically in the code, and not require the eliminator to do it at
runtime.

Please review this at http://codereview.chromium.org/4277

Affected files:
   M src/codegen-ia32.cc


Index: src/codegen-ia32.cc
diff --git a/src/codegen-ia32.cc b/src/codegen-ia32.cc
index  
1c6fc5b2c696007bd7426d562871a9cd896d1b28..4f237ea1a51132ead91b30ac4fb6525ff108cf49
  
100644
--- a/src/codegen-ia32.cc
+++ b/src/codegen-ia32.cc
@@ -1127,7 +1127,7 @@ void ToBooleanStub::Generate(MacroAssembler* masm) {
    __ sahf();
    __ pop(eax);
    __ j(zero, &false_result);
-  __ jmp(&true_result);
+  // Fall through to |true_result|.

    // Return 1/0 for true/false in eax.
    __ bind(&true_result);
@@ -1492,7 +1492,7 @@ void GenericBinaryOpStub::Generate(MacroAssembler*  
masm) {
        __ bind(&slow);
        __ mov(eax, Operand(esp, 1 * kPointerSize));
        __ mov(edx, Operand(esp, 2 * kPointerSize));
-      __ jmp(&call_runtime);
+      // Fall through to |call_runtime|.
        break;
      }
      case Token::BIT_OR:



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to