Summary: | [WHLSL] The lexer should not choke on a single '/' | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Robin Morisset <rmorisset> | ||||||||||
Component: | WebGPU | Assignee: | Robin Morisset <rmorisset> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, mmaxfield, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Robin Morisset
2019-07-17 15:30:38 PDT
Created attachment 374342 [details]
Patch
Comment on attachment 374342 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=374342&action=review > Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.cpp:121 > + if (auto parseFailure = parser.parse(program, decompressAndDecodeStandardLibrary(), Parser::Mode::StandardLibrary)) { We probably want this to be able to use the static NeverDestroyed standard library in StandardLibraryUtilities.cpp so we don’t have a whole lot of copies of it and don’t have to decompress it multiple times No test? Created attachment 374354 [details]
Patch
Added a test, and modified parseFullStandardLibrary so we only load and decompress the stdlib once, using the static NeverDestroyed<String> as suggested by Myles.
Created attachment 374356 [details]
Patch
Comment on attachment 374356 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=374356&action=review > Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.cpp:124 > + if (dumpPassFailure) > + dataLogLn("failed to parse the standard library: ", *parseFailure); > + return WTF::nullopt; > + } See comment below. > Source/WebCore/Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:81 > + return parseFailure; The standard library should never be a parse failure. Instead of returning the error, we should ASSERT(). The return type of this function should be "void". Created attachment 374361 [details]
Patch for landing
The commit-queue encountered the following flaky tests while processing attachment 374361 [details]: http/tests/IndexedDB/collect-IDB-objects.https.html bug 199881 (author: youennf@gmail.com) The commit-queue is continuing to process your patch. The commit-queue encountered the following flaky tests while processing attachment 374361 [details]: storage/indexeddb/dont-wedge.html bug 199883 (authors: beidson@apple.com, commit-queue@webkit.org, dgrogan@chromium.org, and mark.lam@apple.com) The commit-queue is continuing to process your patch. Comment on attachment 374361 [details] Patch for landing Clearing flags on attachment: 374361 Committed r247554: <https://trac.webkit.org/changeset/247554> All reviewed patches have been landed. Closing bug. |