Ignore:
Timestamp:
Mar 28, 2013, 6:09:53 PM (12 years ago)
Author:
[email protected]
Message:

Simplified the bytecode by removing op_loop and op_loop_if_*
https://bugs.webkit.org/show_bug.cgi?id=113548

Reviewed by Filip Pizlo.

Regular jumps will suffice.

These opcodes are identical to branches, except they also do timeout
checking. That style of timeout checking has been broken for a long
time, and when we add back timeout checking, it won't use these opcodes.

(JSC::CodeBlock::dumpBytecode):

  • bytecode/Opcode.h:

(JSC):
(JSC::padOpcodeName):

  • bytecode/PreciseJumpTargets.cpp:

(JSC::computePreciseJumpTargets):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitJump):
(JSC::BytecodeGenerator::emitJumpIfTrue):
(JSC::BytecodeGenerator::emitJumpIfFalse):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.h:

(JSC::DFG::canCompileOpcode):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):

  • jit/JIT.h:

(JIT):
(JSC):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r147184 r147190  
    690690        void emit_op_jngreatereq(Instruction*);
    691691        void emit_op_jtrue(Instruction*);
    692         void emit_op_loop(Instruction*);
    693692        void emit_op_loop_hint(Instruction*);
    694         void emit_op_loop_if_less(Instruction*);
    695         void emit_op_loop_if_lesseq(Instruction*);
    696         void emit_op_loop_if_greater(Instruction*);
    697         void emit_op_loop_if_greatereq(Instruction*);
    698         void emit_op_loop_if_true(Instruction*);
    699         void emit_op_loop_if_false(Instruction*);
    700693        void emit_op_lshift(Instruction*);
    701694        void emit_op_mod(Instruction*);
     
    788781        void emitSlow_op_jngreatereq(Instruction*, Vector<SlowCaseEntry>::iterator&);
    789782        void emitSlow_op_jtrue(Instruction*, Vector<SlowCaseEntry>::iterator&);
    790         void emitSlow_op_loop_if_less(Instruction*, Vector<SlowCaseEntry>::iterator&);
    791         void emitSlow_op_loop_if_lesseq(Instruction*, Vector<SlowCaseEntry>::iterator&);
    792         void emitSlow_op_loop_if_greater(Instruction*, Vector<SlowCaseEntry>::iterator&);
    793         void emitSlow_op_loop_if_greatereq(Instruction*, Vector<SlowCaseEntry>::iterator&);
    794         void emitSlow_op_loop_if_true(Instruction*, Vector<SlowCaseEntry>::iterator&);
    795         void emitSlow_op_loop_if_false(Instruction*, Vector<SlowCaseEntry>::iterator&);
    796783        void emitSlow_op_lshift(Instruction*, Vector<SlowCaseEntry>::iterator&);
    797784        void emitSlow_op_mod(Instruction*, Vector<SlowCaseEntry>::iterator&);
     
    958945    } JIT_CLASS_ALIGNMENT;
    959946
    960     inline void JIT::emit_op_loop(Instruction* currentInstruction)
    961     {
    962         emitTimeoutCheck();
    963         emit_op_jmp(currentInstruction);
    964     }
    965 
    966947    inline void JIT::emit_op_loop_hint(Instruction*)
    967948    {
     
    969950    }
    970951
    971     inline void JIT::emit_op_loop_if_true(Instruction* currentInstruction)
    972     {
    973         emitTimeoutCheck();
    974         emit_op_jtrue(currentInstruction);
    975     }
    976 
    977     inline void JIT::emitSlow_op_loop_if_true(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    978     {
    979         emitSlow_op_jtrue(currentInstruction, iter);
    980     }
    981 
    982     inline void JIT::emit_op_loop_if_false(Instruction* currentInstruction)
    983     {
    984         emitTimeoutCheck();
    985         emit_op_jfalse(currentInstruction);
    986     }
    987 
    988     inline void JIT::emitSlow_op_loop_if_false(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    989     {
    990         emitSlow_op_jfalse(currentInstruction, iter);
    991     }
    992 
    993     inline void JIT::emit_op_loop_if_less(Instruction* currentInstruction)
    994     {
    995         emitTimeoutCheck();
    996         emit_op_jless(currentInstruction);
    997     }
    998 
    999     inline void JIT::emitSlow_op_loop_if_less(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    1000     {
    1001         emitSlow_op_jless(currentInstruction, iter);
    1002     }
    1003 
    1004     inline void JIT::emit_op_loop_if_lesseq(Instruction* currentInstruction)
    1005     {
    1006         emitTimeoutCheck();
    1007         emit_op_jlesseq(currentInstruction);
    1008     }
    1009 
    1010     inline void JIT::emitSlow_op_loop_if_lesseq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    1011     {
    1012         emitSlow_op_jlesseq(currentInstruction, iter);
    1013     }
    1014 
    1015     inline void JIT::emit_op_loop_if_greater(Instruction* currentInstruction)
    1016     {
    1017         emitTimeoutCheck();
    1018         emit_op_jgreater(currentInstruction);
    1019     }
    1020 
    1021     inline void JIT::emitSlow_op_loop_if_greater(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    1022     {
    1023         emitSlow_op_jgreater(currentInstruction, iter);
    1024     }
    1025 
    1026     inline void JIT::emit_op_loop_if_greatereq(Instruction* currentInstruction)
    1027     {
    1028         emitTimeoutCheck();
    1029         emit_op_jgreatereq(currentInstruction);
    1030     }
    1031 
    1032     inline void JIT::emitSlow_op_loop_if_greatereq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    1033     {
    1034         emitSlow_op_jgreatereq(currentInstruction, iter);
    1035     }
    1036 
    1037952} // namespace JSC
    1038953
Note: See TracChangeset for help on using the changeset viewer.