Ignore:
Timestamp:
May 8, 2009, 8:08:41 AM (16 years ago)
Author:
[email protected]
Message:

2009-05-08 Cameron Zwarich <[email protected]>

Reviewed by Maciej Stachowiak.

Add a new opcode jnlesseq, and optimize its compilation in the JIT using
techniques similar to what were used to optimize jnless in r43363.

This gives a 0.7% speedup on SunSpider, particularly on the tests 3d-cube,
control-flow-recursive, date-format-xparb, and string-base64.

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::dump): Add support for dumping op_jnlesseq.
  • bytecode/Opcode.h: Add op_jnlesseq to the list of opcodes.
  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitJumpIfFalse): Add a peephole optimization for op_jnlesseq when emitting lesseq followed by a jump.
  • interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): Add case for op_jnlesseq.
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): Add case for op_jnlesseq. (JSC::JIT::privateCompileSlowCases): Add case for op_jnlesseq.
  • jit/JIT.h:
  • jit/JITArithmetic.cpp: (JSC::JIT::compileFastArith_op_jnlesseq): Added. (JSC::JIT::compileFastArithSlow_op_jnlesseq): Added.
  • jit/JITStubs.cpp: (JSC::JITStubs::cti_op_jlesseq): Added.
  • jit/JITStubs.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r43374 r43401  
    17821782}
    17831783
     1784int JITStubs::cti_op_jlesseq(STUB_ARGS_DECLARATION)
     1785{
     1786    STUB_INIT_STACK_FRAME(stackFrame);
     1787
     1788    JSValue src1 = stackFrame.args[0].jsValue();
     1789    JSValue src2 = stackFrame.args[1].jsValue();
     1790    CallFrame* callFrame = stackFrame.callFrame;
     1791
     1792    bool result = jsLessEq(callFrame, src1, src2);
     1793    CHECK_FOR_EXCEPTION_AT_END();
     1794    return result;
     1795}
     1796
    17841797EncodedJSValue JITStubs::cti_op_not(STUB_ARGS_DECLARATION)
    17851798{
Note: See TracChangeset for help on using the changeset viewer.