[webkit-changes] [WebKit/WebKit] 2b6ef0: [WGSL] Prefix AST files to avoid name clashes

Dan Glastonbury noreply at github.com
Mon Oct 17 00:17:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2b6ef0c64240a9ffe3037d3dd84d07863a704253
      https://github.com/WebKit/WebKit/commit/2b6ef0c64240a9ffe3037d3dd84d07863a704253
  Author: Dan Glastonbury <djg at apple.com>
  Date:   2022-10-17 (Mon, 17 Oct 2022)

  Changed paths:
    A Source/WebGPU/WGSL/AST/ASTArrayAccess.h
    A Source/WebGPU/WGSL/AST/ASTAssignmentStatement.h
    A Source/WebGPU/WGSL/AST/ASTAttribute.h
    A Source/WebGPU/WGSL/AST/ASTCallableExpression.h
    A Source/WebGPU/WGSL/AST/ASTCompoundStatement.h
    A Source/WebGPU/WGSL/AST/ASTDecl.h
    A Source/WebGPU/WGSL/AST/ASTExpression.h
    A Source/WebGPU/WGSL/AST/ASTFunctionDecl.h
    A Source/WebGPU/WGSL/AST/ASTGlobalDirective.h
    A Source/WebGPU/WGSL/AST/ASTIdentifierExpression.h
    A Source/WebGPU/WGSL/AST/ASTLiteralExpressions.h
    A Source/WebGPU/WGSL/AST/ASTNode.h
    A Source/WebGPU/WGSL/AST/ASTReturnStatement.h
    A Source/WebGPU/WGSL/AST/ASTShaderModule.h
    A Source/WebGPU/WGSL/AST/ASTStatement.h
    A Source/WebGPU/WGSL/AST/ASTStructureAccess.h
    A Source/WebGPU/WGSL/AST/ASTStructureDecl.h
    A Source/WebGPU/WGSL/AST/ASTTypeDecl.h
    A Source/WebGPU/WGSL/AST/ASTUnaryExpression.h
    A Source/WebGPU/WGSL/AST/ASTVariableDecl.h
    A Source/WebGPU/WGSL/AST/ASTVariableQualifier.h
    A Source/WebGPU/WGSL/AST/ASTVariableStatement.h
    R Source/WebGPU/WGSL/AST/Attribute.h
    R Source/WebGPU/WGSL/AST/Decl.h
    R Source/WebGPU/WGSL/AST/Expression.h
    R Source/WebGPU/WGSL/AST/Expressions/ArrayAccess.h
    R Source/WebGPU/WGSL/AST/Expressions/CallableExpression.h
    R Source/WebGPU/WGSL/AST/Expressions/IdentifierExpression.h
    R Source/WebGPU/WGSL/AST/Expressions/LiteralExpressions.h
    R Source/WebGPU/WGSL/AST/Expressions/StructureAccess.h
    R Source/WebGPU/WGSL/AST/Expressions/UnaryExpression.h
    R Source/WebGPU/WGSL/AST/FunctionDecl.h
    R Source/WebGPU/WGSL/AST/GlobalDirective.h
    R Source/WebGPU/WGSL/AST/ShaderModule.h
    R Source/WebGPU/WGSL/AST/Statement.h
    R Source/WebGPU/WGSL/AST/Statements/AssignmentStatement.h
    R Source/WebGPU/WGSL/AST/Statements/CompoundStatement.h
    R Source/WebGPU/WGSL/AST/Statements/ReturnStatement.h
    R Source/WebGPU/WGSL/AST/Statements/VariableStatement.h
    R Source/WebGPU/WGSL/AST/StructureDecl.h
    R Source/WebGPU/WGSL/AST/TypeDecl.h
    R Source/WebGPU/WGSL/AST/VariableDecl.h
    R Source/WebGPU/WGSL/AST/VariableQualifier.h
    R Source/WebGPU/WGSL/ASTNode.h
    M Source/WebGPU/WGSL/Parser.cpp
    M Source/WebGPU/WGSL/Parser.h
    M Source/WebGPU/WGSL/ParserPrivate.h
    M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj
    M Tools/TestWebKitAPI/Configurations/TestWGSL.xcconfig
    M Tools/TestWebKitAPI/Tests/WGSL/ConstLiteralTests.cpp
    M Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp

  Log Message:
  -----------
  [WGSL] Prefix AST files to avoid name clashes
https://bugs.webkit.org/show_bug.cgi?id=246561
rdar://problem/101198489

Reviewed by Dean Jackson.

WebGPU project has two headers named ShaderModule.h which causes issues with
headermap header inclusion.

Using example set by JavaScriptCore, prefix all WGSL AST source files with an
AST prefix and remove the directory structure under WebGPU/WGSL/AST/.

Fix all errors reported by `check-webkit-style`.

* Source/WebGPU/WGSL/AST/ASTArrayAccess.h: Renamed from Source/WebGPU/WGSL/AST/Expressions/ArrayAccess.h.
* Source/WebGPU/WGSL/AST/ASTAssignmentStatement.h: Renamed from Source/WebGPU/WGSL/AST/Statements/AssignmentStatement.h.
* Source/WebGPU/WGSL/AST/ASTAttribute.h: Renamed from Source/WebGPU/WGSL/AST/Attribute.h.
* Source/WebGPU/WGSL/AST/ASTCallableExpression.h: Renamed from Source/WebGPU/WGSL/AST/Expressions/CallableExpression.h.
* Source/WebGPU/WGSL/AST/ASTCompoundStatement.h: Renamed from Source/WebGPU/WGSL/AST/Statements/CompoundStatement.h.
* Source/WebGPU/WGSL/AST/ASTDecl.h: Renamed from Source/WebGPU/WGSL/AST/Decl.h.
* Source/WebGPU/WGSL/AST/ASTExpression.h: Renamed from Source/WebGPU/WGSL/AST/Expression.h.
* Source/WebGPU/WGSL/AST/ASTFunctionDecl.h: Renamed from Source/WebGPU/WGSL/AST/FunctionDecl.h.
* Source/WebGPU/WGSL/AST/ASTGlobalDirective.h: Renamed from Source/WebGPU/WGSL/AST/GlobalDirective.h.
* Source/WebGPU/WGSL/AST/ASTIdentifierExpression.h: Renamed from Source/WebGPU/WGSL/AST/Expressions/IdentifierExpression.h.
* Source/WebGPU/WGSL/AST/ASTLiteralExpressions.h: Renamed from Source/WebGPU/WGSL/AST/Expressions/LiteralExpressions.h.
* Source/WebGPU/WGSL/AST/ASTReturnStatement.h: Renamed from Source/WebGPU/WGSL/AST/Statements/ReturnStatement.h.
* Source/WebGPU/WGSL/AST/ASTShaderModule.h: Renamed from Source/WebGPU/WGSL/AST/ShaderModule.h.
* Source/WebGPU/WGSL/AST/ASTStatement.h: Renamed from Source/WebGPU/WGSL/AST/Statement.h.
* Source/WebGPU/WGSL/AST/ASTStructureAccess.h: Renamed from Source/WebGPU/WGSL/AST/Expressions/StructureAccess.h.
* Source/WebGPU/WGSL/AST/ASTStructureDecl.h: Renamed from Source/WebGPU/WGSL/AST/StructureDecl.h.
* Source/WebGPU/WGSL/AST/ASTTypeDecl.h: Renamed from Source/WebGPU/WGSL/AST/TypeDecl.h.
* Source/WebGPU/WGSL/AST/ASTUnaryExpression.h: Renamed from Source/WebGPU/WGSL/AST/Expressions/UnaryExpression.h.
* Source/WebGPU/WGSL/AST/ASTVariableDecl.h: Renamed from Source/WebGPU/WGSL/AST/VariableDecl.h.
* Source/WebGPU/WGSL/AST/ASTVariableQualifier.h: Renamed from Source/WebGPU/WGSL/AST/VariableQualifier.h.
* Source/WebGPU/WGSL/AST/ASTVariableStatement.h: Renamed from Source/WebGPU/WGSL/AST/Statements/VariableStatement.h.
* Source/WebGPU/WGSL/Parser.cpp:
* Source/WebGPU/WGSL/Parser.h:
* Source/WebGPU/WGSL/ParserPrivate.h:
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Configurations/TestWGSL.xcconfig:
* Tools/TestWebKitAPI/Tests/WGSL/ConstLiteralTests.cpp:
* Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp:

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




More information about the webkit-changes mailing list