Bug 186446 - jumpTrueOrFalse only takes the fast path for boolean false
Summary: jumpTrueOrFalse only takes the fast path for boolean false
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tadeu Zagallo
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-08 14:06 PDT by Tadeu Zagallo
Modified: 2018-06-08 17:57 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.35 KB, patch)
2018-06-08 14:18 PDT, Tadeu Zagallo
no flags Details | Formatted Diff | Diff
Patch for landing (2.39 KB, patch)
2018-06-08 17:06 PDT, Tadeu Zagallo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tadeu Zagallo 2018-06-08 14:06:06 PDT
jumpTrueOrFalse did a mask check to take the fast path for boolean literals, but it would only work for false. Change it so that it takes the fast path for true, false and undefined.
Comment 1 Radar WebKit Bug Importer 2018-06-08 14:06:44 PDT
<rdar://problem/40949995>
Comment 2 Tadeu Zagallo 2018-06-08 14:18:51 PDT
Created attachment 342326 [details]
Patch
Comment 3 Mark Lam 2018-06-08 15:02:24 PDT
Comment on attachment 342326 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=342326&action=review

r=me with fixes.

> Source/JavaScriptCore/ChangeLog:11
> +        the fast path for true, false and undefined.

and null too.  This is only for 64-bit.  For 32-bit, it was already taking the fast path for true or false, and still does for only those 2 values.  Please add this to the ChangeLog comment so that we don't miscommunicate the scope of this change.

> Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:1824
> +    btqnz t0, ~15, .slow

nit: I prefer you use ~0xf instead so that we can think in terms of the bits being masked.
Comment 4 Tadeu Zagallo 2018-06-08 17:06:27 PDT
Created attachment 342346 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2018-06-08 17:57:29 PDT
Comment on attachment 342346 [details]
Patch for landing

Clearing flags on attachment: 342346

Committed r232658: <https://trac.webkit.org/changeset/232658>
Comment 6 WebKit Commit Bot 2018-06-08 17:57:30 PDT
All reviewed patches have been landed.  Closing bug.