[webkit-changes] [WebKit/WebKit] af938b: [WGSL] Add a tiny DSL for declaring built-in types

Tadeu Zagallo noreply at github.com
Wed Mar 1 01:54:53 PST 2023


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

  Changed paths:
    M Source/WebGPU/WGSL/Overload.h
    M Source/WebGPU/WGSL/TypeCheck.cpp
    A Source/WebGPU/WGSL/TypeDeclarations.rb
    A Source/WebGPU/WGSL/generator/main.rb
    M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj

  Log Message:
  -----------
  [WGSL] Add a tiny DSL for declaring built-in types
https://bugs.webkit.org/show_bug.cgi?id=252251
rdar://105457268

Reviewed by Myles C. Maxfield.

Initializing all the built-in types in C++ is quite verbose, so this patch adds a tiny
embedded DSL in ruby for declaring such types (similar to JavaScriptCore/BytecodeList.rb)

NOTE: We previously had a PR with this change (#10099) but decided to use a JavaScript
DSL instead. That caused some build issues, so we're going back to Ruby.

* Source/WebGPU/WGSL/Overload.h:
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::TypeChecker):
* Source/WebGPU/WGSL/TypeDeclarations.rb: Added.
* Source/WebGPU/WGSL/generator/main.rb: Added.
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:

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




More information about the webkit-changes mailing list