Bug 188517 - [WHLSL] Verify the parser uses the same grammar as the language
Summary: [WHLSL] Verify the parser uses the same grammar as the language
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 176199 189202
  Show dependency treegraph
 
Reported: 2018-08-13 08:50 PDT by Thomas Denney
Modified: 2018-10-13 15:35 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Denney 2018-08-13 08:50:45 PDT
The current hand-written recursive-descent parser is relatively slow and is the main bottleneck of the `prepare` function. The parser should be rewritten using a tool that produces more efficient code, such as https://github.com/antlr/antlr4.
Comment 1 Myles C. Maxfield 2018-08-27 15:21:28 PDT
*** Bug 189014 has been marked as a duplicate of this bug. ***
Comment 2 Myles C. Maxfield 2018-08-27 15:22:11 PDT
It takes 2.5 hours to compile the standard library. 95% of the time is spent parsing.
Comment 3 Myles C. Maxfield 2018-08-28 15:55:01 PDT
One way to do this is by using a parser generator. Another way of doing this is with testing. Another way is via inspection.
Comment 4 Radar WebKit Bug Importer 2018-09-12 18:51:31 PDT
<rdar://problem/44403020>
Comment 5 Myles C. Maxfield 2018-10-13 15:35:46 PDT
Migrated to https://github.com/gpuweb/WHLSL/issues/101