We emit some redundant '{}' around function bodies (we emit them both when visiting the function definition itself and the block). We also emit some branch for ternary expressions instead of just using a ternary.
Created attachment 375771 [details] Patch
Comment on attachment 375771 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=375771&action=review > Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:253 > + m_stringBuilder.append("\n"); I think that appending a single character is slightly more efficient if you use the character: append('\n')
Created attachment 376190 [details] Patch for landing
Comment on attachment 376190 [details] Patch for landing Clearing flags on attachment: 376190 Committed r248729: <https://trac.webkit.org/changeset/248729>
All reviewed patches have been landed. Closing bug.
<rdar://problem/54353040>
The ternary part of this patch was just wrong because of effects. See https://bugs.webkit.org/show_bug.cgi?id=200961