Ignore:
Timestamp:
Nov 9, 2017, 7:16:22 AM (8 years ago)
Author:
Yusuke Suzuki
Message:

[JSC][JIT] Clean up SlowPathCall stubs
https://bugs.webkit.org/show_bug.cgi?id=179247

Reviewed by Saam Barati.

We have bunch of duplicate functions that just call a slow path function.
This patch cleans up the above duplication.

  • jit/JIT.cpp:

(JSC::JIT::emitSlowCaseCall):
(JSC::JIT::privateCompileSlowCases):

  • jit/JIT.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emitSlow_op_unsigned): Deleted.
(JSC::JIT::emitSlow_op_inc): Deleted.
(JSC::JIT::emitSlow_op_dec): Deleted.
(JSC::JIT::emitSlow_op_bitand): Deleted.
(JSC::JIT::emitSlow_op_bitor): Deleted.
(JSC::JIT::emitSlow_op_bitxor): Deleted.
(JSC::JIT::emitSlow_op_lshift): Deleted.
(JSC::JIT::emitSlow_op_rshift): Deleted.
(JSC::JIT::emitSlow_op_urshift): Deleted.
(JSC::JIT::emitSlow_op_div): Deleted.

  • jit/JITArithmetic32_64.cpp:

(JSC::JIT::emitSlow_op_unsigned): Deleted.
(JSC::JIT::emitSlow_op_inc): Deleted.
(JSC::JIT::emitSlow_op_dec): Deleted.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emitSlow_op_create_this): Deleted.
(JSC::JIT::emitSlow_op_check_tdz): Deleted.
(JSC::JIT::emitSlow_op_to_this): Deleted.
(JSC::JIT::emitSlow_op_to_primitive): Deleted.
(JSC::JIT::emitSlow_op_not): Deleted.
(JSC::JIT::emitSlow_op_stricteq): Deleted.
(JSC::JIT::emitSlow_op_nstricteq): Deleted.
(JSC::JIT::emitSlow_op_to_number): Deleted.
(JSC::JIT::emitSlow_op_to_string): Deleted.
(JSC::JIT::emitSlow_op_to_object): Deleted.
(JSC::JIT::emitSlow_op_get_direct_pname): Deleted.
(JSC::JIT::emitSlow_op_has_structure_property): Deleted.

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emitSlow_op_to_primitive): Deleted.
(JSC::JIT::emitSlow_op_not): Deleted.
(JSC::JIT::emitSlow_op_stricteq): Deleted.
(JSC::JIT::emitSlow_op_nstricteq): Deleted.
(JSC::JIT::emitSlow_op_to_number): Deleted.
(JSC::JIT::emitSlow_op_to_string): Deleted.
(JSC::JIT::emitSlow_op_to_object): Deleted.
(JSC::JIT::emitSlow_op_create_this): Deleted.
(JSC::JIT::emitSlow_op_to_this): Deleted.
(JSC::JIT::emitSlow_op_check_tdz): Deleted.
(JSC::JIT::emitSlow_op_get_direct_pname): Deleted.

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitSlow_op_resolve_scope): Deleted.

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emitSlow_op_resolve_scope): Deleted.

  • jit/SlowPathCall.h:

(JSC::JITSlowPathCall::JITSlowPathCall):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp

    r223824 r224626  
    244244    emitTagInt(regT0, regT0);
    245245    emitPutVirtualRegister(result, regT0);
    246 }
    247 
    248 void JIT::emitSlow_op_unsigned(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    249 {
    250     linkAllSlowCases(iter);
    251    
    252     JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_unsigned);
    253     slowPathCall.call();
    254246}
    255247
     
    447439}
    448440
    449 void JIT::emitSlow_op_inc(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    450 {
    451     linkAllSlowCases(iter);
    452 
    453     JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_inc);
    454     slowPathCall.call();
    455 }
    456 
    457441void JIT::emit_op_dec(Instruction* currentInstruction)
    458442{
     
    464448    emitTagInt(regT0, regT0);
    465449    emitPutVirtualRegister(srcDst);
    466 }
    467 
    468 void JIT::emitSlow_op_dec(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    469 {
    470     linkAllSlowCases(iter);
    471 
    472     JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_dec);
    473     slowPathCall.call();
    474450}
    475451
     
    602578}
    603579
    604 void JIT::emitSlow_op_bitand(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    605 {
    606     linkAllSlowCases(iter);
    607 
    608     JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_bitand);
    609     slowPathCall.call();
    610 }
    611 
    612580void JIT::emit_op_bitor(Instruction* currentInstruction)
    613581{
     
    615583}
    616584
    617 void JIT::emitSlow_op_bitor(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    618 {
    619     linkAllSlowCases(iter);
    620 
    621     JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_bitor);
    622     slowPathCall.call();
    623 }
    624 
    625585void JIT::emit_op_bitxor(Instruction* currentInstruction)
    626586{
     
    628588}
    629589
    630 void JIT::emitSlow_op_bitxor(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    631 {
    632     linkAllSlowCases(iter);
    633 
    634     JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_bitxor);
    635     slowPathCall.call();
    636 }
    637 
    638590void JIT::emit_op_lshift(Instruction* currentInstruction)
    639591{
    640592    emitBitBinaryOpFastPath<JITLeftShiftGenerator>(currentInstruction);
    641 }
    642 
    643 void JIT::emitSlow_op_lshift(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    644 {
    645     linkAllSlowCases(iter);
    646 
    647     JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_lshift);
    648     slowPathCall.call();
    649593}
    650594
     
    706650}
    707651
    708 void JIT::emitSlow_op_rshift(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    709 {
    710     linkAllSlowCases(iter);
    711 
    712     JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_rshift);
    713     slowPathCall.call();
    714 }
    715 
    716652void JIT::emit_op_urshift(Instruction* currentInstruction)
    717653{
    718654    emitRightShiftFastPath(currentInstruction, op_urshift);
    719 }
    720 
    721 void JIT::emitSlow_op_urshift(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    722 {
    723     linkAllSlowCases(iter);
    724 
    725     JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_urshift);
    726     slowPathCall.call();
    727655}
    728656
     
    1047975}
    1048976
    1049 void JIT::emitSlow_op_div(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    1050 {
    1051     linkAllSlowCases(iter);
    1052 
    1053     JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_div);
    1054     slowPathCall.call();
    1055 }
    1056 
    1057977void JIT::emit_op_mul(Instruction* currentInstruction)
    1058978{
Note: See TracChangeset for help on using the changeset viewer.