Changeset 239893 in webkit


Ignore:
Timestamp:
Jan 11, 2019 6:46:08 PM (5 years ago)
Author:
mmaxfield@apple.com
Message:

[WHLSL] Add a Visitor class
https://bugs.webkit.org/show_bug.cgi?id=192826

Reviewed by Dean Jackson.

This patch exposes a bunch of the private members of WHLSL's AST nodes so that Visitor can recurse on constituent nodes.
It also writes the recursion in Visitor.h. This is a virtual base class that gets subclassed for compiler passes.

I've split this part into its own patch to aid reviewing of the compiler.

  • Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.cpp:
  • Modules/webgpu/WHLSL/WHLSLVisitor.cpp: Added.

(WebCore::WHLSL::Visitor::visit):
(WebCore::WHLSL::Visitor::checkErrorAndVisit):

  • Modules/webgpu/WHLSL/WHLSLVisitor.h: Added.

(WebCore::WHLSL::Visitor::setError):
(WebCore::WHLSL::Visitor::error const):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
Location:
trunk/Source/WebCore
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r239889 r239893  
     12019-01-11  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        [WHLSL] Add a Visitor class
     4        https://bugs.webkit.org/show_bug.cgi?id=192826
     5
     6        Reviewed by Dean Jackson.
     7
     8        This patch exposes a bunch of the private members of WHLSL's AST nodes so that Visitor can recurse on constituent nodes.
     9        It also writes the recursion in Visitor.h. This is a virtual base class that gets subclassed for compiler passes.
     10
     11        I've split this part into its own patch to aid reviewing of the compiler.
     12
     13        * Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.cpp:
     14        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp: Added.
     15        (WebCore::WHLSL::Visitor::visit):
     16        (WebCore::WHLSL::Visitor::checkErrorAndVisit):
     17        * Modules/webgpu/WHLSL/WHLSLVisitor.h: Added.
     18        (WebCore::WHLSL::Visitor::setError):
     19        (WebCore::WHLSL::Visitor::error const):
     20        * Sources.txt:
     21        * WebCore.xcodeproj/project.pbxproj:
     22
    1232019-01-11  Jer Noble  <jer.noble@apple.com>
    224
  • trunk/Source/WebCore/Sources.txt

    r239864 r239893  
    309309Modules/webgpu/WHLSL/WHLSLLexer.cpp
    310310Modules/webgpu/WHLSL/WHLSLParser.cpp
     311Modules/webgpu/WHLSL/WHLSLVisitor.cpp
    311312Modules/webgpu/WHLSL/AST/WHLSLTypeArgument.cpp
    312313Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.cpp
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r239864 r239893  
    1332613326                C21DF2E71D9E4E9900F5B24C /* CSSFontVariationValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontVariationValue.cpp; sourceTree = "<group>"; };
    1332713327                C21DF2E81D9E4E9900F5B24C /* CSSFontVariationValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontVariationValue.h; sourceTree = "<group>"; };
     13328                C234A98521E886A9003C984D /* WHLSLVisitor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLVisitor.cpp; sourceTree = "<group>"; };
     13329                C234A98721E886AD003C984D /* WHLSLVisitor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLVisitor.h; sourceTree = "<group>"; };
    1332813330                C2458E611FE8979E00594759 /* FontCacheCoreText.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontCacheCoreText.h; sourceTree = "<group>"; };
    1332913331                C26017A11C72DC9900F74A16 /* CSSFontFaceSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontFaceSet.cpp; sourceTree = "<group>"; };
     
    2539525397                                C21BF73A21CD8D7000227979 /* WHLSLProgram.h */,
    2539625398                                C21BF74521CD969800227979 /* WHLSLStandardLibrary.txt */,
     25399                                C234A98521E886A9003C984D /* WHLSLVisitor.cpp */,
     25400                                C234A98721E886AD003C984D /* WHLSLVisitor.h */,
    2539725401                        );
    2539825402                        path = WHLSL;
Note: See TracChangeset for help on using the changeset viewer.