[webkit-reviews] review granted: [Bug 176316] WSL should correctly handle the interaction between casting operators and complex types : [Attachment 319985] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 6 10:28:49 PDT 2017
Filip Pizlo <fpizlo at apple.com> has granted Myles C. Maxfield
<mmaxfield at apple.com>'s request for review:
Bug 176316: WSL should correctly handle the interaction between casting
operators and complex types
https://bugs.webkit.org/show_bug.cgi?id=176316
Attachment 319985: Patch
https://bugs.webkit.org/attachment.cgi?id=319985&action=review
--- Comment #11 from Filip Pizlo <fpizlo at apple.com> ---
Comment on attachment 319985
--> https://bugs.webkit.org/attachment.cgi?id=319985
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=319985&action=review
r=me with comments
> Tools/WebGPUShadingLanguageRI/Checker.js:237
> + checkCastOrCallExpression(node, cast)
Let's make "cast" not be a boolean. It seems that the only use of cast is to
deal with the returnType. What if you replaced "cast" with "returnType", and
visitCastExpression would pass node.returnType while visitCallExpression passes
null.
> Tools/WebGPUShadingLanguageRI/ResolveOverloadImpl.js:68
> + if (returnType) {
> + if (!returnType.unify(unificationContext, func.returnType)) {
> + failures.push(new OverloadResolutionFailure(func, "Return
type " + func.returnType + " does not match " + returnType));
> + continue;
> + }
> + }
Nice
> Tools/WebGPUShadingLanguageRI/StandardLibrary.js:75
> +const standardLibraryEpilogue = `
> +operator bool<><T:Equatable>(T x) {
> + T defaultValue;
> + return x != defaultValue;
> +}
> +`;
Maybe move this to StandardLibraryEpilogue, so that the start line number of it
doesn't depend on the length of the prologue?
More information about the webkit-reviews
mailing list