Changeset 43401 in webkit for trunk/JavaScriptCore/bytecode


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:
Location:
trunk/JavaScriptCore/bytecode
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecode/CodeBlock.cpp

    r43363 r43401  
    903903            break;
    904904        }
     905        case op_jnlesseq: {
     906            int r0 = (++it)->u.operand;
     907            int r1 = (++it)->u.operand;
     908            int offset = (++it)->u.operand;
     909            printf("[%4d] jnlesseq\t\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, locationForOffset(begin, it, offset));
     910            break;
     911        }
    905912        case op_loop_if_less: {
    906913            int r0 = (++it)->u.operand;
  • trunk/JavaScriptCore/bytecode/Opcode.h

    r43331 r43401  
    128128        macro(op_jneq_ptr, 4) \
    129129        macro(op_jnless, 4) \
     130        macro(op_jnlesseq, 4) \
    130131        macro(op_jmp_scopes, 3) \
    131132        macro(op_loop, 2) \
Note: See TracChangeset for help on using the changeset viewer.