[webkit-changes] [WebKit/WebKit] 9aa4f5: [WGSL] Add scope for for-statement

Tadeu Zagallo noreply at github.com
Mon Sep 18 01:58:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9aa4f5708d1b88917b8660ce5fc8081663ff3699
      https://github.com/WebKit/WebKit/commit/9aa4f5708d1b88917b8660ce5fc8081663ff3699
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-09-18 (Mon, 18 Sep 2023)

  Changed paths:
    M Source/WebGPU/WGSL/ConstantRewriter.cpp
    M Source/WebGPU/WGSL/GlobalSorting.cpp
    M Source/WebGPU/WGSL/MangleNames.cpp
    M Source/WebGPU/WGSL/TypeCheck.cpp

  Log Message:
  -----------
  [WGSL] Add scope for for-statement
https://bugs.webkit.org/show_bug.cgi?id=261612
rdar://115561511

Reviewed by Dan Glastonbury.

For statements can introduce variables which are only in scope within its body,
so it needs to introduce a new scope.

* Source/WebGPU/WGSL/ConstantRewriter.cpp:
(WGSL::ConstantRewriter::visit):
* Source/WebGPU/WGSL/GlobalSorting.cpp:
(WGSL::GraphBuilder<ASTNode>::visit):
* Source/WebGPU/WGSL/MangleNames.cpp:
(WGSL::NameManglerVisitor::visit):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):

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




More information about the webkit-changes mailing list