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.
Created attachment 373554 [details] Patch
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.
(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.
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. 👍
Comment on attachment 373554 [details] Patch Clearing flags on attachment: 373554 Committed r247189: <https://trac.webkit.org/changeset/247189>
All reviewed patches have been landed. Closing bug.
<rdar://problem/52708994>