Bug 201521 - Refactor the Gigacage code to require less pointer casting.
Summary: Refactor the Gigacage code to require less pointer casting.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks: 201570
  Show dependency treegraph
 
Reported: 2019-09-05 15:16 PDT by Mark Lam
Modified: 2019-09-06 18:26 PDT (History)
10 users (show)

See Also:


Attachments
proposed patch. (22.08 KB, patch)
2019-09-05 15:29 PDT, Mark Lam
saam: review+
Details | Formatted Diff | Diff
patch for landing. (21.77 KB, patch)
2019-09-05 16:14 PDT, Mark Lam
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2019-09-05 15:16:41 PDT
Also clean up the code a bit.
Comment 1 Mark Lam 2019-09-05 15:29:47 PDT
Created attachment 378129 [details]
proposed patch.
Comment 2 Radar WebKit Bug Importer 2019-09-05 15:30:33 PDT
<rdar://problem/55087505>
Comment 3 Radar WebKit Bug Importer 2019-09-05 15:30:41 PDT
<rdar://problem/55087515>
Comment 4 Saam Barati 2019-09-05 15:53:32 PDT
Comment on attachment 378129 [details]
proposed patch.

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

r=me

> Source/bmalloc/ChangeLog:17
> +        5. Change LLInt's loadCagedJSValue() to skip the caging if Gigacage is not enabled
> +           in the build.  This allows us to remove the unneeded stubs in WTF Gigacage.h.

nit: some part of this belongs in the JSC changelog.

> Source/bmalloc/bmalloc/Gigacage.h:50
> +    NumberOfKinds // This should always be at the end of this list.

this comment is implied by the name of the enum value

> Source/bmalloc/bmalloc/Gigacage.h:61
> +        break; // Invalid: go to BCRASH();

no need for this comment
Comment 5 Mark Lam 2019-09-05 16:08:48 PDT
Thanks for the review.

(In reply to Saam Barati from comment #4)
> > Source/bmalloc/ChangeLog:17
> > +        5. Change LLInt's loadCagedJSValue() to skip the caging if Gigacage is not enabled
> > +           in the build.  This allows us to remove the unneeded stubs in WTF Gigacage.h.
> 
> nit: some part of this belongs in the JSC changelog.

Fixed.

> 
> > Source/bmalloc/bmalloc/Gigacage.h:50
> > +    NumberOfKinds // This should always be at the end of this list.
> 
> this comment is implied by the name of the enum value

Fixed.

> > Source/bmalloc/bmalloc/Gigacage.h:61
> > +        break; // Invalid: go to BCRASH();
> 
> no need for this comment

Fixed.
Comment 6 Mark Lam 2019-09-05 16:14:20 PDT
Created attachment 378133 [details]
patch for landing.
Comment 7 Mark Lam 2019-09-05 16:28:23 PDT
The jsc EWS is red purportedly due to a build failure.  However, that failure can only manifest if the bot is picking up an outdated Gigacage.h.  Obviously, the JSC lib built correctly for all the other bots.  So the jsc EWS failure is bogus.
Comment 8 Mark Lam 2019-09-05 17:04:18 PDT
Landed in r249556: <http://trac.webkit.org/r249556>.