Bug 186446

Summary: jumpTrueOrFalse only takes the fast path for boolean false
Product: WebKit Reporter: Tadeu Zagallo <tzagallo>
Component: JavaScriptCoreAssignee: Tadeu Zagallo <tzagallo>
Severity: Normal CC: commit-queue, ews-watchlist, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch for landing none

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
Comment 2 Tadeu Zagallo 2018-06-08 14:18:51 PDT
Created attachment 342326 [details]
Comment 3 Mark Lam 2018-06-08 15:02:24 PDT
Comment on attachment 342326 [details]

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.