[webkit-changes] [WebKit/WebKit] b965bb: [WGSL] Use String instead of StringView for Identi...

Tadeu Zagallo noreply at github.com
Wed Jan 18 12:18:07 PST 2023


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

  Changed paths:
    M Source/WebGPU/WGSL/AST/ASTArrayAccess.h
    M Source/WebGPU/WGSL/AST/ASTAttribute.h
    M Source/WebGPU/WGSL/AST/ASTBuiltinAttribute.h
    M Source/WebGPU/WGSL/AST/ASTFunctionDecl.h
    M Source/WebGPU/WGSL/AST/ASTGlobalDirective.h
    M Source/WebGPU/WGSL/AST/ASTIdentifierExpression.h
    M Source/WebGPU/WGSL/AST/ASTLocationAttribute.h
    M Source/WebGPU/WGSL/AST/ASTStructureAccess.h
    M Source/WebGPU/WGSL/AST/ASTStructureDecl.h
    M Source/WebGPU/WGSL/AST/ASTTypeDecl.h
    M Source/WebGPU/WGSL/AST/ASTVariableDecl.h
    M Source/WebGPU/WGSL/Lexer.cpp
    M Source/WebGPU/WGSL/Lexer.h
    M Source/WebGPU/WGSL/Parser.cpp
    M Source/WebGPU/WGSL/ParserPrivate.h
    M Source/WebGPU/WGSL/Token.h

  Log Message:
  -----------
  [WGSL] Use String instead of StringView for Identifiers
https://bugs.webkit.org/show_bug.cgi?id=250680
<rdar://problem/104299588>

Reviewed by Myles C. Maxfield.

There should be no extra cost if we create the string without copying and it
allows us to use runtime-generated strings which will be necessary soon.

* Source/WebGPU/WGSL/AST/ASTArrayAccess.h:
* Source/WebGPU/WGSL/AST/ASTAttribute.h:
* Source/WebGPU/WGSL/AST/ASTBuiltinAttribute.h:
* Source/WebGPU/WGSL/AST/ASTFunctionDecl.h:
* Source/WebGPU/WGSL/AST/ASTGlobalDirective.h:
(WGSL::AST::GlobalDirective::GlobalDirective):
(WGSL::AST::GlobalDirective::name const):
* Source/WebGPU/WGSL/AST/ASTIdentifierExpression.h:
* Source/WebGPU/WGSL/AST/ASTLocationAttribute.h:
* Source/WebGPU/WGSL/AST/ASTStructureAccess.h:
* Source/WebGPU/WGSL/AST/ASTStructureDecl.h:
* Source/WebGPU/WGSL/AST/ASTTypeDecl.h:
(WGSL::AST::ParameterizedType::stringToKind):
(WGSL::AST::ParameterizedType::stringViewToKind): Deleted.
* Source/WebGPU/WGSL/AST/ASTVariableDecl.h:
* Source/WebGPU/WGSL/Lexer.cpp:
(WGSL::Lexer<T>::lex):
* Source/WebGPU/WGSL/Lexer.h:
(WGSL::Lexer::makeIdentifierToken):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseTypeDecl):
(WGSL::Parser<Lexer>::parseTypeDeclAfterIdentifier):
* Source/WebGPU/WGSL/ParserPrivate.h:
* Source/WebGPU/WGSL/Token.h:
(WGSL::Token::Token):
(WGSL::Token::operator=):
(WGSL::Token::~Token):

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




More information about the webkit-changes mailing list