Bug 21404 - optimize op_jtrue, op_loop_if_true and op_not in various ways
Summary: optimize op_jtrue, op_loop_if_true and op_not in various ways
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Maciej Stachowiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-06 10:40 PDT by Maciej Stachowiak
Modified: 2008-10-06 11:07 PDT (History)
0 users

See Also:


Attachments
speedup patch (17.83 KB, patch)
2008-10-06 10:43 PDT, Maciej Stachowiak
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.