Bug 21404

Summary: optimize op_jtrue, op_loop_if_true and op_not in various ways
Product: WebKit Reporter: Maciej Stachowiak <mjs>
Component: JavaScriptCoreAssignee: Maciej Stachowiak <mjs>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
speedup patch sam: review+

Description Maciej Stachowiak 2008-10-06 10:40:10 PDT
It's possible to speed up opcodes that use toBoolean conversion in a number of ways:

        1) Make JSValue::toBoolean nonvirtual and completely inline by
        making use of the StructureID type field.

        2) Make JSValue::toBoolean not take an ExecState; doesn't need it.

        3) Make op_not, op_loop_if_true and op_jtrue not read the
        ExecState (toBoolean doesn't need it any more) and not check
        exceptions (toBoolean can't throw).
Comment 1 Maciej Stachowiak 2008-10-06 10:43:09 PDT
Created attachment 24116 [details]
speedup patch
Comment 2 Sam Weinig 2008-10-06 10:49:32 PDT
Comment on attachment 24116 [details]
speedup patch

r=me.  Please include the perf delta in the ChangeLog.