[webkit-changes] [WebKit/WebKit] 343b74: [WGSL] Add reference types

Tadeu Zagallo noreply at github.com
Fri Jan 27 02:44:30 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 343b74e1ec191107d59e432dff63836078880f9c
      https://github.com/WebKit/WebKit/commit/343b74e1ec191107d59e432dff63836078880f9c
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M Source/WebGPU/WGSL/AST/ASTForward.h
    M Source/WebGPU/WGSL/AST/ASTNode.h
    M Source/WebGPU/WGSL/AST/ASTStringDumper.cpp
    M Source/WebGPU/WGSL/AST/ASTStringDumper.h
    M Source/WebGPU/WGSL/AST/ASTTypeDecl.h
    M Source/WebGPU/WGSL/AST/ASTVisitor.cpp
    M Source/WebGPU/WGSL/AST/ASTVisitor.h
    M Source/WebGPU/WGSL/EntryPointRewriter.cpp
    M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp

  Log Message:
  -----------
  [WGSL] Add reference types
https://bugs.webkit.org/show_bug.cgi?id=251202
<rdar://problem/104689979>

Reviewed by Myles C. Maxfield.

Remove the existing `TypeReference` node, which was a workaround to have a node
that points to another type node, but it's now no longer necessary.

Replace it with a `ReferenceType` node. The similar name is a bit confusing,
but this actually refers to a reference to type, i.e. `T&` in source.

The node still isn't used in this patch, but another patch will follow this one.

* Source/WebGPU/WGSL/AST/ASTForward.h:
* Source/WebGPU/WGSL/AST/ASTNode.h:
* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::StringDumper::visit):
* Source/WebGPU/WGSL/AST/ASTStringDumper.h:
* Source/WebGPU/WGSL/AST/ASTTypeDecl.h:
(isType):
* Source/WebGPU/WGSL/AST/ASTVisitor.cpp:
(WGSL::AST::Visitor::visit):
* Source/WebGPU/WGSL/AST/ASTVisitor.h:
* Source/WebGPU/WGSL/EntryPointRewriter.cpp:
(WGSL::EntryPointRewriter::getResolvedType):
(WGSL::EntryPointRewriter::constructInputStruct):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::visit):

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




More information about the webkit-changes mailing list