RESOLVED FIXED 192991
[WHLSL] Implement parser AST nodes
https://bugs.webkit.org/show_bug.cgi?id=192991
Summary [WHLSL] Implement parser AST nodes
Myles C. Maxfield
Reported 2018-12-21 12:42:56 PST
[WHLSL] Implement parser AST nodes
Attachments
Patch (205.98 KB, patch)
2018-12-21 12:46 PST, Myles C. Maxfield
no flags
Patch (209.59 KB, patch)
2018-12-21 13:10 PST, Myles C. Maxfield
no flags
Patch (209.60 KB, patch)
2018-12-21 13:27 PST, Myles C. Maxfield
achristensen: review+
Patch for committing (327.12 KB, patch)
2019-01-09 12:00 PST, Myles C. Maxfield
no flags
Patch for committing (325.32 KB, patch)
2019-01-09 22:43 PST, Myles C. Maxfield
no flags
Patch for committing (317.24 KB, patch)
2019-01-10 12:45 PST, Myles C. Maxfield
no flags
Myles C. Maxfield
Comment 1 2018-12-21 12:46:44 PST
Myles C. Maxfield
Comment 2 2018-12-21 13:10:03 PST
Myles C. Maxfield
Comment 3 2018-12-21 13:27:55 PST
Alex Christensen
Comment 4 2019-01-03 08:34:15 PST
Comment on attachment 357974 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=357974&action=review r=me with suggestions > Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h:62 > +} These could probably use comments } // namespace AST > Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:65 > + std::unique_ptr<Expression> m_increment; // nullable > + std::unique_ptr<Statement> m_body; You might consider using UniqueRef for the non-nullable ones. > Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFunctionAttribute.h:40 > +typedef Variant<NumThreadsFunctionAttribute> FunctionAttribute; using FunctionAttribute = Variant<NumThreadsFunctionAttribute>. Also, a Variant of only one type? > Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:46 > + enum class EntryPointType { Declaring storage types for enum classes used as member variables can save memory. Here you only need uint8_t > Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:55 > + Vector<VariableDeclaration>&& m_variableDeclarations; Did you mean to have an r-value reference as a member variable? > Source/WebCore/Modules/webgpu/WHLSL/WHLSLParser.cpp:37 > +namespace WHLSL { > + > +} This file doesn't seem useful right now. I'm assuming it will be soon.
Myles C. Maxfield
Comment 5 2019-01-08 16:24:47 PST
Comment on attachment 357974 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=357974&action=review >> Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFunctionAttribute.h:40 >> +typedef Variant<NumThreadsFunctionAttribute> FunctionAttribute; > > using FunctionAttribute = Variant<NumThreadsFunctionAttribute>. > Also, a Variant of only one type? Yep. We're going to add more in the future. >> Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:55 >> + Vector<VariableDeclaration>&& m_variableDeclarations; > > Did you mean to have an r-value reference as a member variable? Nope. >> Source/WebCore/Modules/webgpu/WHLSL/WHLSLParser.cpp:37 >> +} > > This file doesn't seem useful right now. I'm assuming it will be soon. https://bugs.webkit.org/show_bug.cgi?id=192355
Myles C. Maxfield
Comment 6 2019-01-09 12:00:13 PST
Created attachment 358721 [details] Patch for committing
Myles C. Maxfield
Comment 7 2019-01-09 22:43:02 PST
Created attachment 358780 [details] Patch for committing
Myles C. Maxfield
Comment 8 2019-01-10 12:45:30 PST
Created attachment 358820 [details] Patch for committing
Myles C. Maxfield
Comment 9 2019-01-10 14:18:08 PST
Radar WebKit Bug Importer
Comment 10 2019-01-10 14:20:38 PST
Myles C. Maxfield
Comment 11 2019-01-10 19:54:53 PST
Myles C. Maxfield
Comment 12 2019-01-11 16:39:39 PST
Note You need to log in before you can comment on or make changes to this bug.