Bug 150850

Summary: Fix some inefficiencies in the baseline usage of JITAddGenerator.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: msaboff
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
the patch. msaboff: review+

Description Mark Lam 2015-11-03 13:10:00 PST
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.
Comment 1 Mark Lam 2015-11-03 13:13:01 PST
Created attachment 264716 [details]
the patch.
Comment 2 Michael Saboff 2015-11-03 14:08:50 PST
Comment on attachment 264716 [details]
the patch.

r=me
Comment 3 Mark Lam 2015-11-03 14:15:23 PST
Thanks.  Landed in r191978: <http://trac.webkit.org/r191978>.