2008-06-11 Cameron Zwarich <cwzwarich@uwaterloo.ca>
authorcwzwarich@webkit.org <cwzwarich@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jun 2008 19:48:15 +0000 (19:48 +0000)
committercwzwarich@webkit.org <cwzwarich@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jun 2008 19:48:15 +0000 (19:48 +0000)
commit2a0434bc615fd2e9a08ff6ee35296e6622f386d9
tree1b9ca5751ff90a3a9244729e2679a04d1c81cfef
parent2b5447b4762d30a936d6df2f43155da8fed9c511
2008-06-11  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Darin.

        Bug 19457: Create fused opcodes for tests and conditional jumps
        <https://bugs.webkit.org/show_bug.cgi?id=19457>

        Add a new jless instruction, and modify the code generator to emit it
        instead of the pair (less, jtrue).

        Gives a 3.6% improvement on SunSpider.

        * VM/CodeBlock.cpp:
        (KJS::CodeBlock::dump):
        * VM/CodeGenerator.cpp:
        (KJS::CodeGenerator::CodeGenerator):
        (KJS::CodeGenerator::emitOpcode):
        (KJS::CodeGenerator::retrieveLastBinaryOp):
        (KJS::CodeGenerator::rewindBinaryOp):
        (KJS::CodeGenerator::emitJump):
        (KJS::CodeGenerator::emitJumpIfTrue):
        (KJS::CodeGenerator::emitJumpIfFalse):
        (KJS::CodeGenerator::emitMove):
        (KJS::CodeGenerator::emitNot):
        (KJS::CodeGenerator::emitEqual):
        (KJS::CodeGenerator::emitNotEqual):
        (KJS::CodeGenerator::emitStrictEqual):
        (KJS::CodeGenerator::emitNotStrictEqual):
        (KJS::CodeGenerator::emitLess):
        (KJS::CodeGenerator::emitLessEq):
        (KJS::CodeGenerator::emitPreInc):
        (KJS::CodeGenerator::emitPreDec):
        (KJS::CodeGenerator::emitPostInc):
        (KJS::CodeGenerator::emitPostDec):
        (KJS::CodeGenerator::emitToJSNumber):
        (KJS::CodeGenerator::emitNegate):
        (KJS::CodeGenerator::emitAdd):
        (KJS::CodeGenerator::emitMul):
        (KJS::CodeGenerator::emitDiv):
        (KJS::CodeGenerator::emitMod):
        (KJS::CodeGenerator::emitSub):
        (KJS::CodeGenerator::emitLeftShift):
        (KJS::CodeGenerator::emitRightShift):
        (KJS::CodeGenerator::emitUnsignedRightShift):
        (KJS::CodeGenerator::emitBitAnd):
        (KJS::CodeGenerator::emitBitXOr):
        (KJS::CodeGenerator::emitBitOr):
        (KJS::CodeGenerator::emitBitNot):
        (KJS::CodeGenerator::emitInstanceOf):
        (KJS::CodeGenerator::emitTypeOf):
        (KJS::CodeGenerator::emitIn):
        (KJS::CodeGenerator::emitLoad):
        (KJS::CodeGenerator::emitNewObject):
        (KJS::CodeGenerator::emitNewArray):
        (KJS::CodeGenerator::emitResolve):
        (KJS::CodeGenerator::emitGetScopedVar):
        (KJS::CodeGenerator::emitPutScopedVar):
        (KJS::CodeGenerator::emitResolveBase):
        (KJS::CodeGenerator::emitResolveWithBase):
        (KJS::CodeGenerator::emitResolveFunction):
        (KJS::CodeGenerator::emitGetById):
        (KJS::CodeGenerator::emitPutById):
        (KJS::CodeGenerator::emitPutGetter):
        (KJS::CodeGenerator::emitPutSetter):
        (KJS::CodeGenerator::emitDeleteById):
        (KJS::CodeGenerator::emitGetByVal):
        (KJS::CodeGenerator::emitPutByVal):
        (KJS::CodeGenerator::emitDeleteByVal):
        (KJS::CodeGenerator::emitPutByIndex):
        (KJS::CodeGenerator::emitNewFunction):
        (KJS::CodeGenerator::emitNewRegExp):
        (KJS::CodeGenerator::emitNewFunctionExpression):
        (KJS::CodeGenerator::emitCall):
        (KJS::CodeGenerator::emitReturn):
        (KJS::CodeGenerator::emitEnd):
        (KJS::CodeGenerator::emitConstruct):
        (KJS::CodeGenerator::emitPushScope):
        (KJS::CodeGenerator::emitPopScope):
        (KJS::CodeGenerator::emitDebugHook):
        (KJS::CodeGenerator::emitComplexJumpScopes):
        (KJS::CodeGenerator::emitJumpScopes):
        (KJS::CodeGenerator::emitNextPropertyName):
        (KJS::CodeGenerator::emitGetPropertyNames):
        (KJS::CodeGenerator::emitCatch):
        (KJS::CodeGenerator::emitThrow):
        (KJS::CodeGenerator::emitNewError):
        (KJS::CodeGenerator::emitJumpSubroutine):
        (KJS::CodeGenerator::emitSubroutineReturn):
        * VM/CodeGenerator.h:
        * VM/Machine.cpp:
        (KJS::Machine::privateExecute):
        * VM/Opcode.cpp:
        (KJS::):
        * VM/Opcode.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/VM/CodeBlock.cpp
JavaScriptCore/VM/CodeGenerator.cpp
JavaScriptCore/VM/CodeGenerator.h
JavaScriptCore/VM/Machine.cpp
JavaScriptCore/VM/Opcode.cpp
JavaScriptCore/VM/Opcode.h