[webkit-changes] [WebKit/WebKit] b541f3: [WGSL] Don't attempt to resolve overloads when one...

Tadeu Zagallo noreply at github.com
Fri Mar 31 07:13:50 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b541f3acecef57ddfee4268fb84008d4fad60dde
      https://github.com/WebKit/WebKit/commit/b541f3acecef57ddfee4268fb84008d4fad60dde
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M Source/WebGPU/WGSL/Overload.cpp
    M Source/WebGPU/WGSL/TypeCheck.cpp
    M Source/WebGPU/WGSL/tests/invalid/overload.wgsl

  Log Message:
  -----------
  [WGSL] Don't attempt to resolve overloads when one of the arguments is bottom
https://bugs.webkit.org/show_bug.cgi?id=254741
rdar://107420386

Reviewed by Myles C. Maxfield.

We use the bottom type to avoid expurious error messages related to a previous
error that has already been reported. In this case, if one of the arguments is
bottom it means that some invalid expressionn made its way into the arguments
and we already reported an error for it. If we attempt to resolve the overload
we'll unnecessarily report another error, since overload resolution will fail.

* Source/WebGPU/WGSL/Overload.cpp:
(WGSL::OverloadResolver::conversionRankImpl const):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::chooseOverload):
* Source/WebGPU/WGSL/tests/invalid/overload.wgsl:

Canonical link: https://commits.webkit.org/262401@main




More information about the webkit-changes mailing list