Fix some inefficiencies in the baseline usage of JITAddGenerator.
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2015 22:13:52 +0000 (22:13 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2015 22:13:52 +0000 (22:13 +0000)
commitd8faae1cac54de476db9fccb39693b9db0f8d36d
treea75e241a2cb18e34fbdd4fded345a43929243647
parent7c41fefa7fbc41cfc5ccc14b8b494c4b8728e684
Fix some inefficiencies in the baseline usage of JITAddGenerator.
https://bugs.webkit.org/show_bug.cgi?id=150850

Reviewed by Michael Saboff.

1. emit_op_add() was loading the operands twice.  Removed the redundant load.
2. The snippet may decide that it wants to go the slow path route all the time.
   In that case, emit_op_add will end up emitting a branch to an out of line
   slow path followed by some dead code to store the result of the fast path
   on to the stack.
   We now check if the snippet determined that there's no fast path, and just
   emit the slow path inline, and skip the dead store of the fast path result.

* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_add):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jit/JITArithmetic.cpp