Bug 224414 - [JSC] Do not copy StringSwitchJumpTable
Summary: [JSC] Do not copy StringSwitchJumpTable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-10 22:07 PDT by Yusuke Suzuki
Modified: 2021-04-12 15:02 PDT (History)
7 users (show)

See Also:


Attachments
Patch (41.30 KB, patch)
2021-04-10 22:12 PDT, Yusuke Suzuki
keith_miller: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2021-04-10 22:07:29 PDT
[JSC] Do not copy StringSwitchJumpTable
Comment 1 Yusuke Suzuki 2021-04-10 22:12:01 PDT
Created attachment 425699 [details]
Patch
Comment 2 Yusuke Suzuki 2021-04-11 02:43:29 PDT
My plan is doing the similar thing for SimpleJumpTable, but that was a bit more complicated.
Comment 3 Keith Miller 2021-04-12 12:57:38 PDT
Comment on attachment 425699 [details]
Patch

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

r=me

> Source/JavaScriptCore/ChangeLog:8
> +        Previously, we are copying UnlinkedStringJumpTable to CodeBlock's StringJumpTable because we are embedding CodeLocation pointer

Nit: Since previously is past tense the verb should be were rather than are. Also: "because we are embedding" => "because we embed"

> Source/JavaScriptCore/ChangeLog:9
> +        inside CodeBlock's StringJumpTable. This is copying mostly identical hashtable to each CodeBlock even in DFG and FTL. And this

Nit: "copying mostly" => "copying a mostly". You can also drop the "and in the third sentence.

> Source/JavaScriptCore/ChangeLog:10
> +        even prevents us from inlining op_switch_string in DFG and FTL.

Maybe explain why it prevents inlining.

> Source/JavaScriptCore/ChangeLog:15
> +        from copying unnecessary hashtable, and even this paves the way to inlining switch_string in DFG and FTL.

Nit: hashtables*
Comment 4 Yusuke Suzuki 2021-04-12 15:01:33 PDT
Committed r275840 (236408@main): <https://commits.webkit.org/236408@main>
Comment 5 Radar WebKit Bug Importer 2021-04-12 15:02:13 PDT
<rdar://problem/76559929>