Bug 200632 - [WHLSL] TypeNamer can be simplified by replacing BaseTypeNameNode with uniqued AST::UnnamedTypes
Summary: [WHLSL] TypeNamer can be simplified by replacing BaseTypeNameNode with unique...
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: Sam Weinig
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-12 10:42 PDT by Sam Weinig
Modified: 2019-08-26 11:59 PDT (History)
6 users (show)

See Also:


Attachments
Patch (27.40 KB, patch)
2019-08-12 11:00 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (27.40 KB, patch)
2019-08-13 09:37 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (25.82 KB, patch)
2019-08-17 13:58 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (25.73 KB, patch)
2019-08-24 19:38 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2019-08-12 10:42:07 PDT
[WHLSL] TypeNamer can be simplified by replacing BaseTypeNameNode with uniqued AST::UnnamedTypes
Comment 1 Sam Weinig 2019-08-12 11:00:52 PDT
Created attachment 376080 [details]
Patch
Comment 2 Sam Weinig 2019-08-13 09:37:13 PDT
Created attachment 376175 [details]
Patch
Comment 3 Sam Weinig 2019-08-16 20:11:45 PDT
Saam, any thoughts on this?
Comment 4 Myles C. Maxfield 2019-08-16 21:04:16 PDT
Comment on attachment 376175 [details]
Patch

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

> Source/WebCore/ChangeLog:11
> +        There is no longer a reason to keep a parallel tree of the UnnamedType-like objects
> +        BaseTypeNameNodes. Instead, we can store a single HashMap mapping from UnnamedTypeKeys
> +        to MangledTypeName, and use the the UnnamedType stored in the UnnamedTypeKey while 
> +        emitting the metal code.        

What's the motivation for this?
Comment 5 Sam Weinig 2019-08-16 22:30:45 PDT
(In reply to Myles C. Maxfield from comment #4)
> Comment on attachment 376175 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=376175&action=review
> 
> > Source/WebCore/ChangeLog:11
> > +        There is no longer a reason to keep a parallel tree of the UnnamedType-like objects
> > +        BaseTypeNameNodes. Instead, we can store a single HashMap mapping from UnnamedTypeKeys
> > +        to MangledTypeName, and use the the UnnamedType stored in the UnnamedTypeKey while 
> > +        emitting the metal code.        
> 
> What's the motivation for this?

Simplifying the code. Removing unnecessary indirection.
Comment 6 Sam Weinig 2019-08-17 13:58:34 PDT
Created attachment 376613 [details]
Patch
Comment 7 Sam Weinig 2019-08-24 19:38:14 PDT
Created attachment 377219 [details]
Patch
Comment 8 Saam Barati 2019-08-26 11:26:12 PDT
Comment on attachment 377219 [details]
Patch

Nice. r=me
Comment 9 WebKit Commit Bot 2019-08-26 11:58:07 PDT
Comment on attachment 377219 [details]
Patch

Clearing flags on attachment: 377219

Committed r249109: <https://trac.webkit.org/changeset/249109>
Comment 10 WebKit Commit Bot 2019-08-26 11:58:09 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2019-08-26 11:59:17 PDT
<rdar://problem/54716312>