-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WGSL] Only visit functions and structures once
https://bugs.webkit.org/show_bug.cgi?id=260144 rdar://113854125 Reviewed by Dan Glastonbury. Originally, the type checker and name mangling pass did two passes over global declarations. That was necessary since declarations can refer to other declarations that only appear later in the program. However, in 266862@main we introduced a new pass that sorts all declarations, guaranteeing that by the time we visit a given declaration, any other declaration it depends on will have already been visited. This allows simplifying the code, and doing a single pass over all declarations. * Source/WebGPU/WGSL/MangleNames.cpp: (WGSL::NameManglerVisitor::run): (WGSL::NameManglerVisitor::visit): (WGSL::NameManglerVisitor::visitFunctionBody): Deleted. * Source/WebGPU/WGSL/TypeCheck.cpp: (WGSL::TypeChecker::check): (WGSL::TypeChecker::visit): (WGSL::TypeChecker::visitStructMembers): Deleted. (WGSL::TypeChecker::visitFunctionBody): Deleted. * Source/WebGPU/WGSL/TypeStore.cpp: (WGSL::TypeStore::structType): * Source/WebGPU/WGSL/TypeStore.h: (WGSL::TypeStore::structType): Canonical link: https://commits.webkit.org/266900@main
- Loading branch information
1 parent
58a7098
commit c950705
Showing
4 changed files
with
15 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters