Ignore:
Timestamp:
Jul 3, 2011, 10:59:03 PM (14 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=63879
Reduce code duplication for op_jless, op_jlesseq, op_jnless, op_jnlesseq.

Reviewed by Sam Weinig.

There is a lot of copy & paste code here; we can reduce duplication by making
a shared implementation.

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::branch32):
(JSC::MacroAssembler::commute):

  • Make these function platform agnostic.
  • assembler/MacroAssemblerX86Common.h:
    • Moved branch32/commute up to MacroAssembler.
  • jit/JIT.h:

(JSC::JIT::emit_op_loop_if_lesseq):
(JSC::JIT::emitSlow_op_loop_if_lesseq):

  • Add an implementation matching that for op_loop_if_less, which just calls op_jless.
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_jless):
(JSC::JIT::emit_op_jlesseq):
(JSC::JIT::emit_op_jnless):
(JSC::JIT::emit_op_jnlesseq):
(JSC::JIT::emitSlow_op_jless):
(JSC::JIT::emitSlow_op_jlesseq):
(JSC::JIT::emitSlow_op_jnless):
(JSC::JIT::emitSlow_op_jnlesseq):

  • Common implmentations of these methods for JSVALUE64 & JSVALUE32_64.

(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareAndJumpSlow):

  • Internal implmementation of jless etc for JSVALUE64.
  • jit/JITArithmetic32_64.cpp:

(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareAndJumpSlow):

  • Internal implmementation of jless etc for JSVALUE32_64.
  • jit/JITOpcodes.cpp:
  • jit/JITOpcodes32_64.cpp:
  • jit/JITStubs.cpp:
  • jit/JITStubs.h:
    • Remove old implementation of emit_op_loop_if_lesseq.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r90349 r90352  
     12011-07-03  Gavin Barraclough  <[email protected]>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=63879
     4        Reduce code duplication for op_jless, op_jlesseq, op_jnless, op_jnlesseq.
     5
     6        Reviewed by Sam Weinig.
     7       
     8        There is a lot of copy & paste code here; we can reduce duplication by making
     9        a shared implementation.
     10
     11        * assembler/MacroAssembler.h:
     12        (JSC::MacroAssembler::branch32):
     13        (JSC::MacroAssembler::commute):
     14            - Make these function platform agnostic.
     15        * assembler/MacroAssemblerX86Common.h:
     16            - Moved branch32/commute up to MacroAssembler.
     17        * jit/JIT.h:
     18        (JSC::JIT::emit_op_loop_if_lesseq):
     19        (JSC::JIT::emitSlow_op_loop_if_lesseq):
     20            - Add an implementation matching that for op_loop_if_less, which just calls op_jless.
     21        * jit/JITArithmetic.cpp:
     22        (JSC::JIT::emit_op_jless):
     23        (JSC::JIT::emit_op_jlesseq):
     24        (JSC::JIT::emit_op_jnless):
     25        (JSC::JIT::emit_op_jnlesseq):
     26        (JSC::JIT::emitSlow_op_jless):
     27        (JSC::JIT::emitSlow_op_jlesseq):
     28        (JSC::JIT::emitSlow_op_jnless):
     29        (JSC::JIT::emitSlow_op_jnlesseq):
     30            - Common implmentations of these methods for JSVALUE64 & JSVALUE32_64.
     31        (JSC::JIT::emit_compareAndJump):
     32        (JSC::JIT::emit_compareAndJumpSlow):
     33            - Internal implmementation of jless etc for JSVALUE64.
     34        * jit/JITArithmetic32_64.cpp:
     35        (JSC::JIT::emit_compareAndJump):
     36        (JSC::JIT::emit_compareAndJumpSlow):
     37            - Internal implmementation of jless etc for JSVALUE32_64.
     38        * jit/JITOpcodes.cpp:
     39        * jit/JITOpcodes32_64.cpp:
     40        * jit/JITStubs.cpp:
     41        * jit/JITStubs.h:
     42            - Remove old implementation of emit_op_loop_if_lesseq.
     43
    1442011-07-03  Sheriff Bot  <[email protected]>
    245
Note: See TracChangeset for help on using the changeset viewer.