[webkit-changes] [WebKit/WebKit] 2fa5e5: [WGSL] Validate functions missing a return statement

Tadeu Zagallo noreply at github.com
Mon Mar 25 09:51:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2fa5e500ae947d383e44891f61cd27213c0f622e
      https://github.com/WebKit/WebKit/commit/2fa5e500ae947d383e44891f61cd27213c0f622e
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2024-03-25 (Mon, 25 Mar 2024)

  Changed paths:
    M Source/WebGPU/WGSL/TypeCheck.cpp
    M Source/WebGPU/WGSL/tests/invalid/function-call.wgsl

  Log Message:
  -----------
  [WGSL] Validate functions missing a return statement
https://bugs.webkit.org/show_bug.cgi?id=271482
rdar://124143123

Reviewed by Mike Wyrzykowski.

Implement the behavior analysis from the spec[1] and check if functions with a
return type are missing a return statement.

[1]: https://www.w3.org/TR/WGSL/#behaviors

* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
(WGSL::TypeChecker::analyze):
(WGSL::TypeChecker::analyzeStatements):
* Source/WebGPU/WGSL/tests/invalid/function-call.wgsl:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list