Bug 206330 - Reduce the code generated by DFGSlowPathGenerator.h
Summary: Reduce the code generated by DFGSlowPathGenerator.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Robin Morisset
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-15 17:51 PST by Robin Morisset
Modified: 2020-01-16 15:05 PST (History)
8 users (show)

See Also:


Attachments
Patch (3.43 KB, patch)
2020-01-15 17:54 PST, Robin Morisset
mark.lam: review+
Details | Formatted Diff | Diff
Patch (3.44 KB, patch)
2020-01-16 14:32 PST, Robin Morisset
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Morisset 2020-01-15 17:51:01 PST
The FunctionType parameter is only needed by CallResultAndArgumentsSlowPathGenerator, not by its base class CallSlowPathGenerator.
Moving it allows saving about 300kB from JavaScriptCore, by reducing the number of instantiations of the methods of CallSlowPathGenerator.
Comment 1 Robin Morisset 2020-01-15 17:54:17 PST
Created attachment 387880 [details]
Patch
Comment 2 Robin Morisset 2020-01-15 17:59:46 PST
(In reply to Robin Morisset from comment #0)
> The FunctionType parameter is only needed by
> CallResultAndArgumentsSlowPathGenerator, not by its base class
> CallSlowPathGenerator.
> Moving it allows saving about 300kB from JavaScriptCore, by reducing the
> number of instantiations of the methods of CallSlowPathGenerator.

NB: the 300kB were measured on a debug build, it is probably about 4x less in release mode.
Comment 3 Mark Lam 2020-01-16 14:06:39 PST
Comment on attachment 387880 [details]
Patch

r=me
Comment 4 Mark Lam 2020-01-16 14:07:33 PST
Comment on attachment 387880 [details]
Patch

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

> Source/JavaScriptCore/ChangeLog:9
> +        Moving it allows saving about 300kB from JavaScriptCore, by reducing the number of instantiations of the methods of CallSlowPathGenerator.

You should make it clear that this is on a Debug build.  The better thing to do would be to cite numbers for a Release build.
Comment 5 Robin Morisset 2020-01-16 14:32:22 PST
Created attachment 387960 [details]
Patch

Thanks for the review!
I updated the Changelog, it is 200kB in release mode.
Comment 6 WebKit Commit Bot 2020-01-16 15:04:33 PST
Comment on attachment 387960 [details]
Patch

Clearing flags on attachment: 387960

Committed r254712: <https://trac.webkit.org/changeset/254712>
Comment 7 WebKit Commit Bot 2020-01-16 15:04:35 PST
All reviewed patches have been landed.  Closing bug.