[webkit-changes] [WebKit/WebKit] 1ebcb3: [WGSL] Fix overload resolution for addition

Dan Glastonbury noreply at github.com
Mon Feb 20 20:54:50 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1ebcb3a273397522bcd8d856e3dfa3a81c2e9b67
      https://github.com/WebKit/WebKit/commit/1ebcb3a273397522bcd8d856e3dfa3a81c2e9b67
  Author: Dan Glastonbury <djg at apple.com>
  Date:   2023-02-20 (Mon, 20 Feb 2023)

  Changed paths:
    M Source/WebGPU/WGSL/generator/main.js
    M Tools/TestWebKitAPI/Tests/WGSL/MetalGenerationTests.cpp

  Log Message:
  -----------
  [WGSL] Fix overload resolution for addition
https://bugs.webkit.org/show_bug.cgi?id=252524
rdar://105624218

Reviewed by Tadeu Zagallo.

The generator for TypeDeclarations.h required some care and feeding to correctly
initialize typeVariable and numericVariables fields of candidate.

Also added name to FunctionType and cleaned up the comment generation to not
print `// #{name} :: undefined`.

* Source/WebGPU/WGSL/generator/main.js:
(ConstrainedVariable.prototype.dump):
(ConstrainedVariable):
(TypeVariable.prototype.dump):
(NumericVariable.prototype.dump):
(FunctionType):
(FunctionType.prototype.dump):
(prototype.toString): Deleted.
(prototype.dump): Deleted.
(prototype.toCpp): Deleted.
* Tools/TestWebKitAPI/Tests/WGSL/MetalGenerationTests.cpp:
(TestWGSLAPI::TEST):

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




More information about the webkit-changes mailing list