RESOLVED FIXED 199537
[WHLSL] The checker does not need to keep a separate m_typeAnnotations map
https://bugs.webkit.org/show_bug.cgi?id=199537
Summary [WHLSL] The checker does not need to keep a separate m_typeAnnotations map
Robin Morisset
Reported 2019-07-05 16:39:34 PDT
Nothing is ever deleted from it, and all of its contents are eventually copied into the expressions. We might as well put the type annotations directly into the expressions in the first place. It is about a 5% speedup of the checker.
Attachments
Patch (4.93 KB, patch)
2019-07-05 16:42 PDT, Robin Morisset
no flags
Robin Morisset
Comment 1 2019-07-05 16:42:31 PDT
Myles C. Maxfield
Comment 2 2019-07-05 16:44:58 PDT
Comment on attachment 373554 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373554&action=review > Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp:-845 > - if (leftInfo->typeAnnotation.isRightValue()) { > - setError(); > - return; > - } Why? This seems important.
Robin Morisset
Comment 3 2019-07-05 16:46:15 PDT
(In reply to Myles C. Maxfield from comment #2) > Comment on attachment 373554 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=373554&action=review > > > Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp:-845 > > - if (leftInfo->typeAnnotation.isRightValue()) { > > - setError(); > > - return; > > - } > > Why? This seems important. It comes from auto leftInfo = recurseAndGetInfo(assignmentExpression.left(), true); And the true in that means that we went through: if (requiresLeftValue && typeAnnotation.isRightValue()) { setError(); return WTF::nullopt; } So it is redundant.
Myles C. Maxfield
Comment 4 2019-07-05 16:50:42 PDT
Comment on attachment 373554 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373554&action=review >>> Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp:-845 >>> - } >> >> Why? This seems important. > > It comes from auto leftInfo = recurseAndGetInfo(assignmentExpression.left(), true); > And the true in that means that we went through: > if (requiresLeftValue && typeAnnotation.isRightValue()) { > setError(); > return WTF::nullopt; > } > So it is redundant. 👍
WebKit Commit Bot
Comment 5 2019-07-05 17:33:07 PDT
Comment on attachment 373554 [details] Patch Clearing flags on attachment: 373554 Committed r247189: <https://trac.webkit.org/changeset/247189>
WebKit Commit Bot
Comment 6 2019-07-05 17:33:09 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2019-07-05 17:34:19 PDT
Note You need to log in before you can comment on or make changes to this bug.