[webkit-changes] [WebKit/WebKit] cac21a: [WGSL] Remove m_ prefix from public struct members

Tadeu Zagallo noreply at github.com
Fri Mar 17 02:18:45 PDT 2023


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

  Changed paths:
    M Source/WebGPU/WGSL/AST/ASTStringDumper.cpp
    M Source/WebGPU/WGSL/CallGraph.h
    M Source/WebGPU/WGSL/CompilationMessage.cpp
    M Source/WebGPU/WGSL/CompilationMessage.h
    M Source/WebGPU/WGSL/EntryPointRewriter.cpp
    M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
    M Source/WebGPU/WGSL/Lexer.cpp
    M Source/WebGPU/WGSL/Lexer.h
    M Source/WebGPU/WGSL/MangleNames.cpp
    M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
    M Source/WebGPU/WGSL/Parser.cpp
    M Source/WebGPU/WGSL/SourceSpan.h
    M Source/WebGPU/WGSL/Token.h
    M Tools/TestWebKitAPI/Tests/WGSL/LexerTests.cpp

  Log Message:
  -----------
  [WGSL] Remove m_ prefix from public struct members
https://bugs.webkit.org/show_bug.cgi?id=253665
rdar://106512980

Reviewed by Myles C. Maxfield.

This was originally landed in https://commits.webkit.org/261690@main, but contained
a bug in Token::Token (when I removed the `m_` prefix the class member `ident` was
shadowed by the parameter with the same name). This commit brings bag the original
change with the fix applied.

* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::Indent::Indent):
* Source/WebGPU/WGSL/CallGraph.h:
* Source/WebGPU/WGSL/CompilationMessage.cpp:
(WGSL::CompilationMessage::dump const):
* Source/WebGPU/WGSL/CompilationMessage.h:
(WGSL::CompilationMessage::lineNumber const):
(WGSL::CompilationMessage::lineOffset const):
(WGSL::CompilationMessage::offset const):
(WGSL::CompilationMessage::length const):
* Source/WebGPU/WGSL/EntryPointRewriter.cpp:
(WGSL::EntryPointRewriter::constructInputStruct):
(WGSL::EntryPointRewriter::materialize):
(WGSL::EntryPointRewriter::visit):
(WGSL::EntryPointRewriter::appendBuiltins):
(WGSL::rewriteEntryPoints):
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::run):
(WGSL::RewriteGlobalVariables::visit):
(WGSL::RewriteGlobalVariables::collectGlobals):
(WGSL::RewriteGlobalVariables::requiredGroups):
(WGSL::RewriteGlobalVariables::insertStructs):
* Source/WebGPU/WGSL/Lexer.cpp:
(WGSL::Lexer<T>::shift):
(WGSL::Lexer<T>::newLine):
* Source/WebGPU/WGSL/Lexer.h:
(WGSL::Lexer::currentOffset const):
(WGSL::Lexer::currentTokenLength const):
* Source/WebGPU/WGSL/MangleNames.cpp:
(WGSL::NameManglerVisitor::run):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::write):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::canBeginUnaryExpression):
(WGSL::canContinueMultiplicativeExpression):
(WGSL::canContinueAdditiveExpression):
(WGSL::canContinueBitwiseExpression):
(WGSL::canContinueRelationalExpression):
(WGSL::canContinueShortCircuitAndExpression):
(WGSL::canContinueShortCircuitOrExpression):
(WGSL::toBinaryOperation):
(WGSL::toUnaryOperation):
(WGSL::Parser<Lexer>::consumeType):
(WGSL::Parser<Lexer>::consumeTypes):
(WGSL::Parser<Lexer>::parseIdentifier):
(WGSL::Parser<Lexer>::parseGlobalDecl):
(WGSL::Parser<Lexer>::parseAttributes):
(WGSL::Parser<Lexer>::parseAttribute):
(WGSL::Parser<Lexer>::parseStructure):
(WGSL::Parser<Lexer>::parseTypeName):
(WGSL::Parser<Lexer>::parseTypeNameAfterIdentifier):
(WGSL::Parser<Lexer>::parseArrayType):
(WGSL::Parser<Lexer>::parseVariableWithAttributes):
(WGSL::Parser<Lexer>::parseVariableQualifier):
(WGSL::Parser<Lexer>::parseStorageClass):
(WGSL::Parser<Lexer>::parseAccessMode):
(WGSL::Parser<Lexer>::parseFunction):
(WGSL::Parser<Lexer>::parseStatement):
(WGSL::Parser<Lexer>::parseCompoundStatement):
(WGSL::Parser<Lexer>::parseReturnStatement):
(WGSL::Parser<Lexer>::parseShortCircuitExpression):
(WGSL::Parser<Lexer>::parseShiftExpressionPostUnary):
(WGSL::Parser<Lexer>::parseAdditiveExpressionPostUnary):
(WGSL::Parser<Lexer>::parseBitwiseExpressionPostUnary):
(WGSL::Parser<Lexer>::parseMultiplicativeExpressionPostUnary):
(WGSL::Parser<Lexer>::parsePostfixExpression):
(WGSL::Parser<Lexer>::parsePrimaryExpression):
(WGSL::Parser<Lexer>::parseCoreLHSExpression):
(WGSL::Parser<Lexer>::parseArgumentExpressionList):
* Source/WebGPU/WGSL/SourceSpan.h:
(WGSL::SourceSpan::SourceSpan):
(WGSL::SourceSpan::operator== const):
* Source/WebGPU/WGSL/Token.h:
(WGSL::Token::Token):
(WGSL::Token::operator=):
(WGSL::Token::~Token):
* Tools/TestWebKitAPI/Tests/WGSL/LexerTests.cpp:
(TestWGSLAPI::checkSingleToken):
(TestWGSLAPI::checkSingleLiteral):
(TestWGSLAPI::checkNextTokenIs):
(TestWGSLAPI::checkNextTokenIsIdentifier):
(TestWGSLAPI::checkNextTokenIsLiteral):

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




More information about the webkit-changes mailing list