WebKit Bugzilla
Attachment 356585 Details for
Bug 192355
: [WHLSL] Add a handwritten parser
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP
bug-192355-20181204232429.patch (text/plain), 93.11 KB, created by
Myles C. Maxfield
on 2018-12-04 23:24:30 PST
(
hide
)
Description:
WIP
Filename:
MIME Type:
Creator:
Myles C. Maxfield
Created:
2018-12-04 23:24:30 PST
Size:
93.11 KB
patch
obsolete
>Subversion Revision: 238885 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 438c7e7e06789118ef7008682a335d6babbe9821..01e85950e9a54647b4f0ee5881a1e41cf5f1bdff 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,77 @@ >+2018-12-04 Myles C. Maxfield <mmaxfield@apple.com> >+ >+ [WHLSL] Add a handwritten parser >+ https://bugs.webkit.org/show_bug.cgi?id=192355 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests (OOPS!). >+ >+ * Modules/webgpu/WHLSL/WHLSLASTEnumDef.cpp: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTEnumDef.h: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTFuncDef.cpp: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTFuncDef.h: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTNativeFuncDecl.cpp: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTNativeFuncDecl.h: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTNativeTypeDecl.cpp: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTNativeTypeDecl.h: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTStructDef.cpp: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTStructDef.h: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTType.cpp: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTType.h: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTTypeDef.cpp: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTTypeDef.h: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTVariableDecl.cpp: Added. >+ * Modules/webgpu/WHLSL/WHLSLASTVariableDecl.h: Added. >+ * Modules/webgpu/WHLSL/WHLSLLexer.cpp: Added. >+ (WebCore::WHLSL::Lexer::consumeTokenFromStream): >+ (WebCore::WHLSL::Lexer::skipWhitespaceAndComments): >+ (WebCore::WHLSL::isWhitespace): >+ (WebCore::WHLSL::isNewline): >+ (WebCore::WHLSL::Lexer::skipWhitespace): >+ (WebCore::WHLSL::Lexer::skipLineComment): >+ (WebCore::WHLSL::Lexer::skipLongComment): >+ (WebCore::WHLSL::Lexer::coreDecimalIntLiteral const): >+ (WebCore::WHLSL::Lexer::decimalIntLiteral const): >+ (WebCore::WHLSL::Lexer::decimalUintLiteral const): >+ (WebCore::WHLSL::isHexadecimalCharacter): >+ (WebCore::WHLSL::Lexer::coreHexadecimalIntLiteral const): >+ (WebCore::WHLSL::Lexer::hexadecimalIntLiteral const): >+ (WebCore::WHLSL::Lexer::hexadecimalUintLiteral const): >+ (WebCore::WHLSL::Lexer::intLiteral const): >+ (WebCore::WHLSL::Lexer::digit const): >+ (WebCore::WHLSL::Lexer::digitStar const): >+ (WebCore::WHLSL::Lexer::character const): >+ (WebCore::WHLSL::Lexer::coreFloatLiteralType1 const): >+ (WebCore::WHLSL::Lexer::coreFloatLiteral const): >+ (WebCore::WHLSL::Lexer::floatLiteral const): >+ (WebCore::WHLSL::Lexer::qualifier const): >+ (WebCore::WHLSL::Lexer::semantic const): >+ (WebCore::WHLSL::Lexer::numthreads const): >+ (WebCore::WHLSL::Lexer::validIdentifier const): >+ (WebCore::WHLSL::Lexer::identifier const): >+ (WebCore::WHLSL::Lexer::operatorName const): >+ * Modules/webgpu/WHLSL/WHLSLLexer.h: Added. >+ (WebCore::WHLSL::Lexer::Lexer): >+ (WebCore::WHLSL::Lexer::consumeToken): >+ (WebCore::WHLSL::Lexer::unconsumeToken): >+ (WebCore::WHLSL::Lexer::state const): >+ (WebCore::WHLSL::Lexer::setState): >+ (WebCore::WHLSL::Lexer::isFullyConsumed const): >+ (WebCore::WHLSL::Lexer::string const): >+ (WebCore::WHLSL::Lexer::anyCharacter const): >+ * Modules/webgpu/WHLSL/WHLSLParser.cpp: Added. >+ (WebCore::WHLSL::Parser::Parser): >+ (WebCore::WHLSL::Parser::parse): >+ (WebCore::WHLSL::Parser::parseType): >+ * Modules/webgpu/WHLSL/WHLSLParser.h: Added. >+ (WebCore::WHLSL::Parser::backtrackingScope): >+ (WebCore::WHLSL::Parser::testScope): >+ * Modules/webgpu/WHLSL/WHLSLProgram.cpp: Added. >+ * Modules/webgpu/WHLSL/WHLSLProgram.h: Added. >+ * Sources.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ > 2018-12-04 Frederic Wang <fwang@igalia.com> > > Always pass scrollingGeometry to update*ScrollingNode functions >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTConstExpr.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTConstExpr.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..bf7160f64fcd2475a3e6dd7c61eb57f345f2bb8e >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTConstExpr.cpp >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLASTConstExpr.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTConstExpr.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTConstExpr.h >new file mode 100644 >index 0000000000000000000000000000000000000000..d3e5388c5658fe690ec00c06593d6d1863e05fee >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTConstExpr.h >@@ -0,0 +1,82 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "WHLSLLexer.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+class ConstExpr { >+public: >+ static ConstExpr createWithLiteral(Lexer::Token&& token) >+ { >+ ConstExpr result; >+ result.first = WTFMove(token); >+ result.type = Type::Literal; >+ return result; >+ } >+ >+ static ConstExpr createWithIdentifier(Lexer::Token&& token) >+ { >+ ConstExpr result; >+ result.first = WTFMove(token); >+ result.type = Type::Identifier; >+ return result; >+ } >+ >+ static ConstExpr createWithIdentifierDotIdentifier(Lexer::Token&& token1, Lexer::Token&& token2) >+ { >+ ConstExpr result; >+ result.first = WTFMove(token1); >+ result.second = WTFMove(token2); >+ result.type = Type::Identifier; >+ return result; >+ } >+ >+private: >+ Lexer::Token first; >+ Lexer::Token second; >+ >+ enum class Type { >+ Literal, >+ Identifier, >+ IdentifierDotIdentifier >+ } type; >+}; >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTEnumDef.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTEnumDef.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..623cb0768d2dea4c1c588a757d286750cea98f5e >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTEnumDef.cpp >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLASTEnumDef.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTEnumDef.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTEnumDef.h >new file mode 100644 >index 0000000000000000000000000000000000000000..152d5ec90a7fc023740f597f1757d472344b92b5 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTEnumDef.h >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+class EnumDef { >+}; >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTFuncDef.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTFuncDef.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..2d63c430306fe8b91c4b20253edbac5ee667fa2f >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTFuncDef.cpp >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLASTFuncDef.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTFuncDef.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTFuncDef.h >new file mode 100644 >index 0000000000000000000000000000000000000000..8d58aa6cca6733aa8fafc50430cd018ecdb19ac8 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTFuncDef.h >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+class FuncDef { >+}; >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTNativeFuncDecl.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTNativeFuncDecl.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..5c42c74d4603492c8460bff075c6fc45b3e2c537 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTNativeFuncDecl.cpp >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLASTNativeFuncDecl.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTNativeFuncDecl.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTNativeFuncDecl.h >new file mode 100644 >index 0000000000000000000000000000000000000000..577fb841e5fe5bbef1d4c110c4a3243d64a1c29e >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTNativeFuncDecl.h >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+class NativeFuncDecl { >+}; >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTNativeTypeDecl.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTNativeTypeDecl.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..72b74ad26e6520b2aa300b8fbd3d32e215c85e81 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTNativeTypeDecl.cpp >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLASTNativeTypeDecl.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTNativeTypeDecl.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTNativeTypeDecl.h >new file mode 100644 >index 0000000000000000000000000000000000000000..bfbfc8173971895da0ae16468a1259bace84b049 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTNativeTypeDecl.h >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+class NativeTypeDecl { >+}; >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTStructDef.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTStructDef.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..d88b1a19e6ddfaf59f45a835dd52d28d5ee90a53 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTStructDef.cpp >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLASTStructDef.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTStructDef.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTStructDef.h >new file mode 100644 >index 0000000000000000000000000000000000000000..6ffd6b92d9946c9d1f203b604293c6646b768725 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTStructDef.h >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+class StructDef { >+}; >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTType.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTType.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..0aa193f91d9886816e7d04c271ac71f50a71dc09 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTType.cpp >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLASTType.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTType.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTType.h >new file mode 100644 >index 0000000000000000000000000000000000000000..86e67692d706cbe74a6724903d154866f27218ec >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTType.h >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+class Type { >+}; >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeArgument.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeArgument.h >new file mode 100644 >index 0000000000000000000000000000000000000000..05cc2deefbcd43c6f1738f6aaa77172de173648c >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeArgument.h >@@ -0,0 +1,51 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "WHLSLASTConstExpr.h" >+#include "WHLSLLexer.h" >+#include <wtf/Variant.h> >+#include <wtf/Vector.h> >+#include <wtf/text/StringView.h> >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+typedef Variant<ConstExpr, Lexer::Token> TypeArgument; >+typedef Vector<TypeArgument> TypeArguments; >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeDef.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeDef.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..b1e7bfc7440a5a9405bcfca2a83a07a89688d528 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeDef.cpp >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLASTTypeDef.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeDef.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeDef.h >new file mode 100644 >index 0000000000000000000000000000000000000000..c2c33e47c7233101dd0bea5da3d5705e2dd9ea56 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeDef.h >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+class TypeDef { >+}; >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeRef.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeRef.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..51cb9ab98f9289e1cac6c7c0065b60d49e9b4c59 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeRef.cpp >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLASTTypeRef.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeRef.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeRef.h >new file mode 100644 >index 0000000000000000000000000000000000000000..6525197f11690e1b35a86d441a324234987c34d1 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTTypeRef.h >@@ -0,0 +1,61 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "WHLSLASTTypeArgument.h" >+#include "WHLSLLexer.h" >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+class TypeRef { >+public: >+ TypeRef(Lexer::Token&& origin, String&& name, Vector<TypeArgument>&& typeArguments) >+ : m_origin(WTFMove(origin)) >+ , m_name(WTFMove(name)) >+ , m_typeArguments(WTFMove(typeArguments)) >+ { >+ } >+ >+private: >+ Lexer::Token m_origin; >+ String m_name; >+ Vector<TypeArgument> m_typeArguments; >+}; >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTVariableDecl.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTVariableDecl.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..57d10ca2697c0f8bc853f99575f96582871422c4 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTVariableDecl.cpp >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLASTVariableDecl.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTVariableDecl.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTVariableDecl.h >new file mode 100644 >index 0000000000000000000000000000000000000000..c4e005b1ba6fb2409ae1f83892b1dc3c34d2b153 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLASTVariableDecl.h >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+class VariableDecl { >+}; >+ >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLLexer.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLLexer.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..1311da925ee5ff06d674b5802a9ab5ca0cd337e3 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLLexer.cpp >@@ -0,0 +1,552 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLLexer.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+auto Lexer::consumeTokenFromStream() -> std::optional<Token> >+{ >+ auto prepare = [&](unsigned newOffset, Token::Type type) -> std::optional<Token> { >+ auto offset = m_offset; >+ m_offset = newOffset; >+ skipWhitespaceAndComments(); >+ return {{ m_stringView.substring(offset, m_offset - offset), type }}; >+ }; >+ >+ if (auto newOffset = intLiteral(m_offset)) >+ return prepare(*newOffset, Token::Type::IntLiteral); >+ if (auto newOffset = floatLiteral(m_offset)) >+ return prepare(*newOffset, Token::Type::FloatLiteral); >+ if (auto newOffset = string("struct", m_offset)) >+ return prepare(*newOffset, Token::Type::Struct); >+ if (auto newOffset = string("typedef", m_offset)) >+ return prepare(*newOffset, Token::Type::Typedef); >+ if (auto newOffset = string("enum", m_offset)) >+ return prepare(*newOffset, Token::Type::Enum); >+ if (auto newOffset = string("operator", m_offset)) >+ return prepare(*newOffset, Token::Type::Operator); >+ if (auto newOffset = string("if", m_offset)) >+ return prepare(*newOffset, Token::Type::If); >+ if (auto newOffset = string("else", m_offset)) >+ return prepare(*newOffset, Token::Type::Else); >+ if (auto newOffset = string("continue", m_offset)) >+ return prepare(*newOffset, Token::Type::Continue); >+ if (auto newOffset = string("break", m_offset)) >+ return prepare(*newOffset, Token::Type::Break); >+ if (auto newOffset = string("switch", m_offset)) >+ return prepare(*newOffset, Token::Type::Switch); >+ if (auto newOffset = string("case", m_offset)) >+ return prepare(*newOffset, Token::Type::Case); >+ if (auto newOffset = string("default", m_offset)) >+ return prepare(*newOffset, Token::Type::Default); >+ if (auto newOffset = string("fallthrough", m_offset)) >+ return prepare(*newOffset, Token::Type::Fallthrough); >+ if (auto newOffset = string("for", m_offset)) >+ return prepare(*newOffset, Token::Type::For); >+ if (auto newOffset = string("while", m_offset)) >+ return prepare(*newOffset, Token::Type::While); >+ if (auto newOffset = string("do", m_offset)) >+ return prepare(*newOffset, Token::Type::Do); >+ if (auto newOffset = string("return", m_offset)) >+ return prepare(*newOffset, Token::Type::Return); >+ if (auto newOffset = string("trap", m_offset)) >+ return prepare(*newOffset, Token::Type::Trap); >+ if (auto newOffset = string("null", m_offset)) >+ return prepare(*newOffset, Token::Type::Null); >+ if (auto newOffset = string("true", m_offset)) >+ return prepare(*newOffset, Token::Type::True); >+ if (auto newOffset = string("false", m_offset)) >+ return prepare(*newOffset, Token::Type::False); >+ if (auto newOffset = string("constant", m_offset)) >+ return prepare(*newOffset, Token::Type::Constant); >+ if (auto newOffset = string("device", m_offset)) >+ return prepare(*newOffset, Token::Type::Device); >+ if (auto newOffset = string("threadgroup", m_offset)) >+ return prepare(*newOffset, Token::Type::Threadgroup); >+ if (auto newOffset = string("thread", m_offset)) >+ return prepare(*newOffset, Token::Type::Thread); >+ if (auto newOffset = string("space", m_offset)) >+ return prepare(*newOffset, Token::Type::Space); >+ if (auto newOffset = string("vertex", m_offset)) >+ return prepare(*newOffset, Token::Type::Vertex); >+ if (auto newOffset = string("fragment", m_offset)) >+ return prepare(*newOffset, Token::Type::Fragment); >+ if (auto newOffset = string("compute", m_offset)) >+ return prepare(*newOffset, Token::Type::Compute); >+ if (auto newOffset = string("numthreads", m_offset)) >+ return prepare(*newOffset, Token::Type::Numthreads); >+ if (auto newOffset = string("native", m_offset)) >+ return prepare(*newOffset, Token::Type::Native); >+ if (auto newOffset = string("restricted", m_offset)) >+ return prepare(*newOffset, Token::Type::Restricted); >+ if (auto newOffset = string("_", m_offset)) >+ return prepare(*newOffset, Token::Type::Underscore); >+ if (auto newOffset = string("auto", m_offset)) >+ return prepare(*newOffset, Token::Type::Auto); >+ if (auto newOffset = string("protocol", m_offset)) >+ return prepare(*newOffset, Token::Type::Protocol); >+ if (auto newOffset = string("const", m_offset)) >+ return prepare(*newOffset, Token::Type::Const); >+ if (auto newOffset = string("static", m_offset)) >+ return prepare(*newOffset, Token::Type::Static); >+ if (auto newOffset = qualifier(m_offset)) >+ return prepare(*newOffset, Token::Type::Qualifier); >+ if (auto newOffset = semantic(m_offset)) >+ return prepare(*newOffset, Token::Type::Semantic); >+ if (auto newOffset = numthreads(m_offset)) >+ return prepare(*newOffset, Token::Type::NumthreadsSemantic); >+ if (auto newOffset = identifier(m_offset)) >+ return prepare(*newOffset, Token::Type::Identifier); >+ if (auto newOffset = operatorName(m_offset)) >+ return prepare(*newOffset, Token::Type::OperatorName); >+ >+ skipWhitespaceAndComments(); >+ return std::nullopt; >+} >+ >+void Lexer::skipWhitespaceAndComments() >+{ >+ unsigned savedOffset; >+ do { >+ savedOffset = m_offset; >+ skipWhitespace(); >+ skipLineComment(); >+ skipLongComment(); >+ } while (savedOffset != m_offset); >+} >+ >+static inline bool isWhitespace(UChar codeUnit) >+{ >+ switch (codeUnit) { >+ case ' ': >+ case '\t': >+ case '\r': >+ case '\n': >+ return true; >+ default: >+ return false; >+ } >+} >+ >+static inline bool isNewline(UChar codeUnit) >+{ >+ switch (codeUnit) { >+ case '\r': >+ case '\n': >+ return true; >+ default: >+ return false; >+ } >+} >+ >+// We can take advantage of two properties of Unicode: >+// 1. The consitutent UTF-16 code units for all non-BMP code points are surrogates, >+// which means we'll never see a false match. If we see a BMP code unit, we >+// really have a BMP code point. >+// 2. Everything we're looking for is in BMP >+ >+void Lexer::skipWhitespace() >+{ >+ for ( ; m_offset < m_stringView.length() && isWhitespace(m_stringView[m_offset]); ++m_offset) { } >+} >+ >+void Lexer::skipLineComment() >+{ >+ if (m_offset + 1 >= m_stringView.length() || m_stringView[m_offset] != '/' || m_stringView[m_offset + 1] != '/') >+ return; >+ >+ m_offset += 2; >+ for ( ; m_offset < m_stringView.length() && !isNewline(m_stringView[m_offset]); ++m_offset) { } >+} >+ >+void Lexer::skipLongComment() >+{ >+ if (m_offset + 1 >= m_stringView.length() || m_stringView[m_offset] != '/' || m_stringView[m_offset + 1] != '*') >+ return; >+ >+ m_offset += 2; >+ do { >+ for ( ; m_offset < m_stringView.length() && m_stringView[m_offset] != '*'; ++m_offset) { } >+ if (m_offset < m_stringView.length()) >+ ++m_offset; >+ if (m_offset < m_stringView.length() && m_stringView[m_offset] == '/') { >+ ++m_offset; >+ break; >+ } >+ } while (m_offset < m_stringView.length()); >+} >+ >+// Regular expression are unnecessary; we shouldn't need to compile them. >+ >+std::optional<unsigned> Lexer::coreDecimalIntLiteral(unsigned offset) const >+{ >+ if (offset >= m_stringView.length()) >+ return std::nullopt; >+ if (m_stringView[offset] == '0') >+ return offset + 1; >+ if (m_stringView[offset] >= '1' && m_stringView[offset] <= '9') { >+ ++offset; >+ for ( ; offset < m_stringView.length() && m_stringView[offset] >= '0' && m_stringView[offset] <= '9'; ++offset) { >+ } >+ return offset; >+ } >+ return std::nullopt; >+} >+ >+std::optional<unsigned> Lexer::decimalIntLiteral(unsigned offset) const >+{ >+ if (offset < m_stringView.length() && m_stringView[offset] == '-') >+ ++offset; >+ return coreDecimalIntLiteral(offset); >+} >+ >+std::optional<unsigned> Lexer::decimalUintLiteral(unsigned offset) const >+{ >+ auto result = coreDecimalIntLiteral(offset); >+ if (!result) >+ return std::nullopt; >+ if (*result < m_stringView.length() && m_stringView[*result] == 'u') >+ return *result + 1; >+ return std::nullopt; >+} >+ >+static inline bool isHexadecimalCharacter(UChar character) >+{ >+ return (character >= '0' && character <= '9') >+ || (character >= 'a' && character <= 'f') >+ || (character >= 'A' && character <= 'F'); >+} >+ >+std::optional<unsigned> Lexer::coreHexadecimalIntLiteral(unsigned offset) const >+{ >+ if (offset + 1 >= m_stringView.length() || m_stringView[offset] != '0' || m_stringView[offset + 1] != 'x') >+ return std::nullopt; >+ >+ offset += 2; >+ if (offset >= m_stringView.length() || !isHexadecimalCharacter(m_stringView[offset])) >+ return std::nullopt; >+ ++offset; >+ for ( ; offset < m_stringView.length() && isHexadecimalCharacter(m_stringView[offset]); ++offset) { >+ } >+ return offset; >+} >+ >+std::optional<unsigned> Lexer::hexadecimalIntLiteral(unsigned offset) const >+{ >+ if (offset < m_stringView.length() && m_stringView[offset] == '-') >+ ++offset; >+ return coreHexadecimalIntLiteral(offset); >+} >+ >+std::optional<unsigned> Lexer::hexadecimalUintLiteral(unsigned offset) const >+{ >+ auto result = coreHexadecimalIntLiteral(offset); >+ if (!result) >+ return std::nullopt; >+ if (*result < m_stringView.length() && m_stringView[*result] == 'u') >+ return *result + 1; >+ return std::nullopt; >+} >+ >+std::optional<unsigned> Lexer::intLiteral(unsigned offset) const >+{ >+ if (auto result = decimalIntLiteral(offset)) >+ return result; >+ if (auto result = decimalUintLiteral(offset)) >+ return result; >+ if (auto result = hexadecimalIntLiteral(offset)) >+ return result; >+ if (auto result = hexadecimalUintLiteral(offset)) >+ return result; >+ return std::nullopt; >+} >+ >+std::optional<unsigned> Lexer::digit(unsigned offset) const >+{ >+ if (offset < m_stringView.length() && m_stringView[offset] >= '0' && m_stringView[offset] <= '9') >+ return offset + 1; >+ return std::nullopt; >+} >+ >+unsigned Lexer::digitStar(unsigned offset) const >+{ >+ while (true) { >+ auto result = digit(offset); >+ if (!result) >+ return offset; >+ offset = *result; >+ } >+} >+ >+std::optional<unsigned> Lexer::character(char character, unsigned offset) const >+{ >+ if (offset < m_stringView.length() && m_stringView[offset] == character) >+ return offset + 1; >+ return std::nullopt; >+} >+ >+std::optional<unsigned> Lexer::coreFloatLiteralType1(unsigned offset) const >+{ >+ auto result = digit(offset); >+ if (!result) >+ return std::nullopt; >+ auto result2 = digitStar(*result); >+ auto result3 = character('.', result2); >+ if (!result3) >+ return std::nullopt; >+ return digitStar(*result3); >+} >+ >+std::optional<unsigned> Lexer::coreFloatLiteral(unsigned offset) const >+{ >+ if (auto type1 = coreFloatLiteralType1(offset)) >+ return type1; >+ auto result = digitStar(offset); >+ auto result2 = character('.', result); >+ if (!result2) >+ return std::nullopt; >+ auto result3 = digit(*result2); >+ if (!result3) >+ return std::nullopt; >+ return digitStar(*result3); >+} >+ >+std::optional<unsigned> Lexer::floatLiteral(unsigned offset) const >+{ >+ if (offset < m_stringView.length() && m_stringView[offset] == '-') >+ ++offset; >+ auto result = coreFloatLiteral(offset); >+ if (!result) >+ return std::nullopt; >+ offset = *result; >+ if (offset < m_stringView.length() && (m_stringView[offset] == 'f' || m_stringView[offset] == 'd')) >+ ++offset; >+ return offset; >+} >+ >+std::optional<unsigned> Lexer::qualifier(unsigned offset) const >+{ >+ if (auto result = string("nointerpolation", offset)) >+ return result; >+ if (auto result = string("noperspective", offset)) >+ return result; >+ if (auto result = string("uniform", offset)) >+ return result; >+ if (auto result = string("centroid", offset)) >+ return result; >+ if (auto result = string("sample", offset)) >+ return result; >+ return std::nullopt; >+} >+ >+std::optional<unsigned> Lexer::semantic(unsigned offset) const >+{ >+ if (auto result = string("SV_InstanceID", offset)) >+ return result; >+ if (auto result = string("SV_VertexID", offset)) >+ return result; >+ if (auto result = string("PSIZE", offset)) >+ return result; >+ if (auto result = string("SV_Position", offset)) >+ return result; >+ if (auto result = string("SV_IsFrontFace", offset)) >+ return result; >+ if (auto result = string("SV_SampleIndex", offset)) >+ return result; >+ if (auto result = string("SV_InnerCoverage", offset)) >+ return result; >+ if (auto result = string("SV_Target", offset)) >+ return coreDecimalIntLiteral(*result); >+ if (auto result = string("SV_Depth", offset)) >+ return result; >+ if (auto result = string("SV_Coverage", offset)) >+ return result; >+ if (auto result = string("SV_DispatchThreadID", offset)) >+ return result; >+ if (auto result = string("SV_GroupID", offset)) >+ return result; >+ if (auto result = string("SV_GroupIndex", offset)) >+ return result; >+ if (auto result = string("SV_GroupThreadID", offset)) >+ return result; >+ if (auto result = string("attribute", offset)) { >+ if ((result = character('(', *result))) { >+ if ((result = coreDecimalIntLiteral(*result))) >+ return character(')', *result); >+ } >+ } >+ if (auto result = string("register", offset)) { >+ if ((result = character('(', *result))) { >+ if ((result = anyCharacter("utbs", *result))) { >+ if ((result = coreDecimalIntLiteral(*result))) { >+ offset = *result; >+ if ((result = character(',', offset))) { >+ if ((result = string("space", *result))) { >+ if ((result = coreDecimalIntLiteral(*result))) >+ return character(')', *result); >+ } >+ return std::nullopt; >+ } >+ return character(')', offset); >+ } >+ } >+ } >+ } >+ if (auto result = string("specialized", offset)) >+ return result; >+ return std::nullopt; >+} >+ >+std::optional<unsigned> Lexer::numthreads(unsigned offset) const >+{ >+ auto result = string("numthreads", offset); >+ if (!result) >+ return std::nullopt; >+ result = character('(', *result); >+ if (!result) >+ return std::nullopt; >+ result = coreDecimalIntLiteral(*result); >+ if (!result) >+ return std::nullopt; >+ result = character(',', *result); >+ if (!result) >+ return std::nullopt; >+ if (auto result2 = character(' ', *result)) >+ result = result2; >+ result = coreDecimalIntLiteral(*result); >+ if (!result) >+ return std::nullopt; >+ result = character(',', *result); >+ if (!result) >+ return std::nullopt; >+ if (auto result2 = character(' ', *result)) >+ result = result2; >+ result = coreDecimalIntLiteral(*result); >+ if (!result) >+ return std::nullopt; >+ return character(')', *result); >+} >+ >+std::optional<unsigned> Lexer::validIdentifier(unsigned offset) const >+{ >+ if (offset >= m_stringView.length() >+ || !((m_stringView[offset] >= 'a' && m_stringView[offset] <= 'z') >+ || (m_stringView[offset] >= 'A' && m_stringView[offset] <= 'Z') >+ || (m_stringView[offset] == '_'))) >+ return std::nullopt; >+ ++offset; >+ while (true) { >+ if (offset >= m_stringView.length() >+ || !((m_stringView[offset] >= 'a' && m_stringView[offset] <= 'z') >+ || (m_stringView[offset] >= 'A' && m_stringView[offset] <= 'Z') >+ || (m_stringView[offset] >= '0' && m_stringView[offset] <= '9') >+ || (m_stringView[offset] == '_'))) >+ return offset; >+ ++offset; >+ } >+} >+ >+std::optional<unsigned> Lexer::identifier(unsigned offset) const >+{ >+ return validIdentifier(offset); >+} >+ >+std::optional<unsigned> Lexer::operatorName(unsigned offset) const >+{ >+ if (auto result = string("operator&.", offset)) >+ return validIdentifier(*result); >+ if (auto result = string("operator.", offset)) { >+ if ((result = validIdentifier(*result))) { >+ if (auto result2 = character('=', *result)) >+ return result2; >+ return *result; >+ } >+ } >+ if (auto result = string("operator", offset)) { >+ if (auto result2 = string(">>", *result)) >+ return result2; >+ if (auto result2 = string("<<", *result)) >+ return result2; >+ if (auto result2 = string("++", *result)) >+ return result2; >+ if (auto result2 = string("--", *result)) >+ return result2; >+ if (auto result2 = string("+", *result)) >+ return result2; >+ if (auto result2 = string("-", *result)) >+ return result2; >+ if (auto result2 = string("*", *result)) >+ return result2; >+ if (auto result2 = string("/", *result)) >+ return result2; >+ if (auto result2 = string("%", *result)) >+ return result2; >+ if (auto result2 = string("&&", *result)) >+ return result2; >+ if (auto result2 = string("||", *result)) >+ return result2; >+ if (auto result2 = string("&[]", *result)) >+ return result2; >+ if (auto result2 = string("&", *result)) >+ return result2; >+ if (auto result2 = string("^", *result)) >+ return result2; >+ if (auto result2 = string("|", *result)) >+ return result2; >+ if (auto result2 = string(">=", *result)) >+ return result2; >+ if (auto result2 = string("<=", *result)) >+ return result2; >+ if (auto result2 = string("==", *result)) >+ return result2; >+ if (auto result2 = string("<", *result)) >+ return result2; >+ if (auto result2 = string(">", *result)) >+ return result2; >+ if (auto result2 = string("!", *result)) >+ return result2; >+ if (auto result2 = string("~", *result)) >+ return result2; >+ if (auto result2 = string("[]=", *result)) >+ return result2; >+ if (auto result2 = string("[]", *result)) >+ return result2; >+ } >+ return std::nullopt; >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLLexer.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLLexer.h >new file mode 100644 >index 0000000000000000000000000000000000000000..b4235954a2774948c24531d760bea7d36b59724a >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLLexer.h >@@ -0,0 +1,194 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include <wtf/Optional.h> >+#include <wtf/Vector.h> >+#include <wtf/text/StringView.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+class Lexer { >+public: >+ Lexer(StringView stringView) >+ : m_stringView(stringView) >+ { >+ skipWhitespaceAndComments(); >+ } >+ >+ struct Token { >+ StringView stringView; >+ enum class Type { >+ IntLiteral, >+ FloatLiteral, >+ Struct, >+ Typedef, >+ Enum, >+ Operator, >+ If, >+ Else, >+ Continue, >+ Break, >+ Switch, >+ Case, >+ Default, >+ Fallthrough, >+ For, >+ While, >+ Do, >+ Return, >+ Trap, >+ Null, >+ True, >+ False, >+ Constant, >+ Device, >+ Threadgroup, >+ Thread, >+ Space, >+ Vertex, >+ Fragment, >+ Compute, >+ Numthreads, >+ Native, >+ Restricted, >+ Underscore, >+ Auto, >+ Protocol, >+ Const, >+ Static, >+ Qualifier, >+ Semantic, >+ NumthreadsSemantic, >+ Identifier, >+ OperatorName >+ } type; >+ }; >+ >+ std::optional<Token> consumeToken() >+ { >+ if (!m_stack.isEmpty()) >+ return m_stack.takeLast(); >+ return consumeTokenFromStream(); >+ } >+ >+ void unconsumeToken(Token&& token) >+ { >+ m_stack.append(WTFMove(token)); >+ } >+ >+ struct State { >+ Vector<Token> stack; >+ unsigned offset; >+ }; >+ >+ State state() const >+ { >+ return { m_stack, m_offset }; >+ } >+ >+ void setState(const State& state) >+ { >+ m_stack = state.stack; >+ m_offset = state.offset; >+ } >+ >+ void setState(State&& state) >+ { >+ m_stack = WTFMove(state.stack); >+ m_offset = WTFMove(state.offset); >+ } >+ >+ bool isFullyConsumed() const >+ { >+ return m_offset == m_stringView.length(); >+ } >+ >+private: >+ std::optional<Token> consumeTokenFromStream(); >+ >+ void skipWhitespaceAndComments(); >+ void skipWhitespace(); >+ void skipLineComment(); >+ void skipLongComment(); >+ >+ std::optional<unsigned> coreDecimalIntLiteral(unsigned) const; >+ std::optional<unsigned> decimalIntLiteral(unsigned) const; >+ std::optional<unsigned> decimalUintLiteral(unsigned) const; >+ std::optional<unsigned> coreHexadecimalIntLiteral(unsigned) const; >+ std::optional<unsigned> hexadecimalIntLiteral(unsigned) const; >+ std::optional<unsigned> hexadecimalUintLiteral(unsigned) const; >+ std::optional<unsigned> intLiteral(unsigned) const; >+ std::optional<unsigned> digit(unsigned) const; >+ unsigned digitStar(unsigned) const; >+ std::optional<unsigned> character(char, unsigned) const; >+ template<unsigned length> std::optional<unsigned> anyCharacter(const char (&string)[length], unsigned) const; >+ std::optional<unsigned> coreFloatLiteralType1(unsigned) const; >+ std::optional<unsigned> coreFloatLiteral(unsigned) const; >+ std::optional<unsigned> floatLiteral(unsigned) const; >+ template<unsigned length> std::optional<unsigned> string(const char (&string)[length], unsigned) const; >+ std::optional<unsigned> qualifier(unsigned) const; >+ std::optional<unsigned> semantic(unsigned) const; >+ std::optional<unsigned> numthreads(unsigned) const; >+ std::optional<unsigned> validIdentifier(unsigned) const; >+ std::optional<unsigned> identifier(unsigned) const; >+ std::optional<unsigned> operatorName(unsigned) const; >+ >+ const StringView m_stringView; >+ Vector<Token> m_stack; >+ unsigned m_offset { 0 }; >+}; >+ >+template<unsigned length> std::optional<unsigned> Lexer::string(const char (&string)[length], unsigned offset) const >+{ >+ for (unsigned i = 0; i < length - 1; ++i) { >+ if (i >= m_stringView.length() || m_stringView[i] != string[i]) >+ return std::nullopt; >+ } >+ return offset + length - 1; >+} >+ >+template<unsigned length> std::optional<unsigned> Lexer::anyCharacter(const char (&string)[length], unsigned offset) const >+{ >+ if (offset >= m_stringView.length()) >+ return std::nullopt; >+ for (unsigned i = 0; i < length - 1; ++i) { >+ if (m_stringView[offset] == string[i]) >+ return offset + 1; >+ } >+ return std::nullopt; >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLParser.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLParser.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..e481c115f7547101b0523ea951e5890194aa151c >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLParser.cpp >@@ -0,0 +1,121 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLParser.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+Parser::Parser(StringView stringView) >+ : m_lexer(stringView) >+{ >+} >+ >+std::optional<Program> Parser::parse() >+{ >+ return std::nullopt; >+} >+ >+std::optional<Lexer::Token> Parser::peek() >+{ >+ if (auto token = m_lexer.consumeToken()) { >+ m_lexer.unconsumeToken(Lexer::Token(*token)); >+ return token; >+ } >+ return std::nullopt; >+} >+ >+std::optional<Lexer::Token> Parser::consumeType(Lexer::Token::Type type) >+{ >+ if (auto token = m_lexer.consumeToken()) { >+ if (token->type == type) >+ return token; >+ } >+ return std::nullopt; >+} >+ >+std::optional<Lexer::Token> Parser::parseLiteral() >+{ >+ auto token = m_lexer.consumeToken(); >+ if (!token) >+ return std::nullopt; >+ switch (token->type) { >+ case Lexer::Token::Type::IntLiteral: >+ case Lexer::Token::Type::FloatLiteral: >+ case Lexer::Token::Type::Null: >+ case Lexer::Token::Type::True: >+ case Lexer::Token::Type::False: >+ return *token; >+ default: >+ return std::nullopt; >+ } >+} >+ >+std::optional<AST::ConstExpr> Parser::parseConstExpr() >+{ >+ auto literal = backtrackingScope<Lexer::Token>([&]() -> std::optional<Lexer::Token> { >+ return parseLiteral(); >+ }); >+ if (literal) >+ return AST::ConstExpr::createWithLiteral(WTFMove(*literal)); >+ if (auto identifier1 = consumeType(Lexer::Token::Type::Identifier)) { >+ auto constExpr = backtrackingScope<AST::ConstExpr>([&]() -> std::optional<AST::ConstExpr> { >+ if (true /*consumeCharacter('.') */) { >+ if (auto identifier2 = consumeType(Lexer::Token::Type::Identifier)) >+ return AST::ConstExpr::createWithIdentifierDotIdentifier(WTFMove(*identifier1), WTFMove(*identifier2)); >+ } >+ return std::nullopt; >+ }); >+ if (constExpr) >+ return *constExpr; >+ return AST::ConstExpr::createWithIdentifier(WTFMove(*identifier1)); >+ } >+ return std::nullopt; >+} >+ >+std::optional<AST::TypeArguments> Parser::parseTypeArguments() >+{ >+ return std::nullopt; >+} >+ >+std::optional<AST::Type> Parser::parseType() >+{ >+ backtrackingScope<AST::Type>([]() -> std::optional<AST::Type> { >+ return std::nullopt; >+ }); >+ return std::nullopt; >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLParser.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLParser.h >new file mode 100644 >index 0000000000000000000000000000000000000000..838411d54d20c57c2afcfe9dcc00e5e7bf4b60ab >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLParser.h >@@ -0,0 +1,85 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "WHLSLASTEnumDef.h" >+#include "WHLSLASTFuncDef.h" >+#include "WHLSLASTNativeFuncDecl.h" >+#include "WHLSLASTNativeTypeDecl.h" >+#include "WHLSLASTStructDef.h" >+#include "WHLSLASTType.h" >+#include "WHLSLASTTypeArgument.h" >+#include "WHLSLASTTypeDef.h" >+#include "WHLSLASTVariableDecl.h" >+#include "WHLSLLexer.h" >+#include "WHLSLProgram.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+class Parser { >+public: >+ Parser(StringView); >+ >+ std::optional<Program> parse(); >+ >+private: >+ template<typename T> std::optional<T> backtrackingScope(std::function<std::optional<T>()> callback) >+ { >+ auto state = m_lexer.state(); >+ if (auto result = callback()) >+ return result; >+ m_lexer.setState(WTFMove(state)); >+ return std::nullopt; >+ } >+ >+ template<typename T> bool testScope(std::function<std::optional<T>()> callback) >+ { >+ auto state = m_lexer.state(); >+ auto result = callback(); >+ m_lexer.setState(WTFMove(state)); >+ return result; >+ } >+ >+ std::optional<Lexer::Token> peek(); >+ std::optional<Lexer::Token> consumeType(Lexer::Token::Type); >+ >+ std::optional<Lexer::Token> parseLiteral(); >+ std::optional<AST::ConstExpr> parseConstExpr(); >+ std::optional<AST::TypeArguments> parseTypeArguments(); >+ std::optional<AST::Type> parseType(); >+ >+ Lexer m_lexer; >+}; >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLProgram.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLProgram.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..3f23f76284042368cda8756e1f0e914fc1a2c9e6 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLProgram.cpp >@@ -0,0 +1,41 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "config.h" >+#include "WHLSLProgram.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLProgram.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLProgram.h >new file mode 100644 >index 0000000000000000000000000000000000000000..562f7f85414d3e68d31263b5fcd04fe94c552cb0 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLProgram.h >@@ -0,0 +1,41 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+class Program { >+}; >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 3146462231f0e7c8ecc9bb1f60ecc98eb146a02e..843423fda96e0c97999646f0d24724742aad1720 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -301,6 +301,19 @@ Modules/websockets/WebSocketHandshake.cpp > Modules/websockets/WorkerThreadableWebSocketChannel.cpp > > Modules/webgpu/DOMWindowWebGPU.cpp >+Modules/webgpu/WHLSL/WHLSLLexer.cpp >+Modules/webgpu/WHLSL/WHLSLParser.cpp >+Modules/webgpu/WHLSL/WHLSLASTVariableDecl.cpp >+Modules/webgpu/WHLSL/WHLSLASTTypeDef.cpp >+Modules/webgpu/WHLSL/WHLSLASTStructDef.cpp >+Modules/webgpu/WHLSL/WHLSLASTEnumDef.cpp >+Modules/webgpu/WHLSL/WHLSLASTFuncDef.cpp >+Modules/webgpu/WHLSL/WHLSLASTNativeFuncDecl.cpp >+Modules/webgpu/WHLSL/WHLSLASTNativeTypeDecl.cpp >+Modules/webgpu/WHLSL/WHLSLProgram.cpp >+Modules/webgpu/WHLSL/WHLSLASTType.cpp >+Modules/webgpu/WHLSL/WHLSLASTTypeRef.cpp >+Modules/webgpu/WHLSL/WHLSLASTConstExpr.cpp > Modules/webgpu/WebGPU.cpp > Modules/webgpu/WebGPUAdapter.cpp > Modules/webgpu/WebGPUCommandBuffer.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 7a26ffcd9eb754841d82e885db6127135e565da9..82e2408eab83c4f2afdb4f58293dfec3f6ab358f 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -6414,6 +6414,9 @@ > 1CAF34800A6C405200ABE06E /* WebScriptObjectPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptObjectPrivate.h; sourceTree = "<group>"; }; > 1CB6B4F8217B83930093B9CD /* TextDecorationThickness.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextDecorationThickness.h; sourceTree = "<group>"; }; > 1CB6B4FB217B83940093B9CD /* TextUnderlineOffset.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextUnderlineOffset.h; sourceTree = "<group>"; }; >+ 1CC46F2621B77860000998DE /* WHLSLASTTypeRef.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLASTTypeRef.cpp; sourceTree = "<group>"; }; >+ 1CC46F2721B77860000998DE /* WHLSLASTTypeRef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLASTTypeRef.h; sourceTree = "<group>"; }; >+ 1CC46F2921B77A32000998DE /* WHLSLASTTypeArgument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLASTTypeArgument.h; sourceTree = "<group>"; }; > 1CCDF5BB1990332400BCEBAD /* SVGToOTFFontConversion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGToOTFFontConversion.cpp; sourceTree = "<group>"; }; > 1CCDF5BC1990332400BCEBAD /* SVGToOTFFontConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGToOTFFontConversion.h; sourceTree = "<group>"; }; > 1CDD45E40BA9C84600F90147 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; }; >@@ -13203,6 +13206,8 @@ > C11A9ED22140578B00CFB20A /* SwitchingGPUClient.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SwitchingGPUClient.cpp; sourceTree = "<group>"; }; > C1E1D235203DF15400584665 /* ScreenProperties.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScreenProperties.h; sourceTree = "<group>"; }; > C2015C091BE6FE2C00822389 /* FontVariantBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontVariantBuilder.h; sourceTree = "<group>"; }; >+ C210E91121B4BD1000B7F83D /* WHLSLLexer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLLexer.cpp; sourceTree = "<group>"; }; >+ C210E91221B4BD1000B7F83D /* WHLSLLexer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLLexer.h; sourceTree = "<group>"; }; > C21DF2E71D9E4E9900F5B24C /* CSSFontVariationValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontVariationValue.cpp; sourceTree = "<group>"; }; > C21DF2E81D9E4E9900F5B24C /* CSSFontVariationValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontVariationValue.h; sourceTree = "<group>"; }; > C2458E611FE8979E00594759 /* FontCacheCoreText.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontCacheCoreText.h; sourceTree = "<group>"; }; >@@ -13220,6 +13225,28 @@ > C2E38EFC1E8396FD00CA3ADF /* CSSFontStyleValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontStyleValue.h; sourceTree = "<group>"; }; > C2E38EFF1E84573500CA3ADF /* CSSFontStyleRangeValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontStyleRangeValue.cpp; sourceTree = "<group>"; }; > C2E38F001E84573500CA3ADF /* CSSFontStyleRangeValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontStyleRangeValue.h; sourceTree = "<group>"; }; >+ C2ECEB4C21B63CBB008F8DE9 /* WHLSLParser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLParser.cpp; sourceTree = "<group>"; }; >+ C2ECEB4D21B63CBB008F8DE9 /* WHLSLParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLParser.h; sourceTree = "<group>"; }; >+ C2ECEB4F21B64C72008F8DE9 /* WHLSLASTVariableDecl.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLASTVariableDecl.cpp; sourceTree = "<group>"; }; >+ C2ECEB5021B64C72008F8DE9 /* WHLSLASTVariableDecl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLASTVariableDecl.h; sourceTree = "<group>"; }; >+ C2ECEB5121B64C84008F8DE9 /* WHLSLASTTypeDef.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLASTTypeDef.cpp; sourceTree = "<group>"; }; >+ C2ECEB5221B64C84008F8DE9 /* WHLSLASTTypeDef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLASTTypeDef.h; sourceTree = "<group>"; }; >+ C2ECEB5321B64C97008F8DE9 /* WHLSLASTStructDef.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLASTStructDef.cpp; sourceTree = "<group>"; }; >+ C2ECEB5421B64C97008F8DE9 /* WHLSLASTStructDef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLASTStructDef.h; sourceTree = "<group>"; }; >+ C2ECEB5521B64CAB008F8DE9 /* WHLSLASTEnumDef.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLASTEnumDef.cpp; sourceTree = "<group>"; }; >+ C2ECEB5621B64CAB008F8DE9 /* WHLSLASTEnumDef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLASTEnumDef.h; sourceTree = "<group>"; }; >+ C2ECEB5721B64CBE008F8DE9 /* WHLSLASTFuncDef.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLASTFuncDef.cpp; sourceTree = "<group>"; }; >+ C2ECEB5821B64CBE008F8DE9 /* WHLSLASTFuncDef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLASTFuncDef.h; sourceTree = "<group>"; }; >+ C2ECEB5921B64CD5008F8DE9 /* WHLSLASTNativeFuncDecl.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLASTNativeFuncDecl.cpp; sourceTree = "<group>"; }; >+ C2ECEB5A21B64CD5008F8DE9 /* WHLSLASTNativeFuncDecl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLASTNativeFuncDecl.h; sourceTree = "<group>"; }; >+ C2ECEB5B21B64CE4008F8DE9 /* WHLSLASTNativeTypeDecl.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLASTNativeTypeDecl.cpp; sourceTree = "<group>"; }; >+ C2ECEB5C21B64CE4008F8DE9 /* WHLSLASTNativeTypeDecl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLASTNativeTypeDecl.h; sourceTree = "<group>"; }; >+ C2ECEB5D21B64D6F008F8DE9 /* WHLSLProgram.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLProgram.cpp; sourceTree = "<group>"; }; >+ C2ECEB5E21B64D6F008F8DE9 /* WHLSLProgram.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLProgram.h; sourceTree = "<group>"; }; >+ C2ECEB5F21B64DC6008F8DE9 /* WHLSLASTType.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLASTType.cpp; sourceTree = "<group>"; }; >+ C2ECEB6021B64DC6008F8DE9 /* WHLSLASTType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLASTType.h; sourceTree = "<group>"; }; >+ C2ECEB6421B7A7CF008F8DE9 /* WHLSLASTConstExpr.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLASTConstExpr.cpp; sourceTree = "<group>"; }; >+ C2ECEB6521B7A7CF008F8DE9 /* WHLSLASTConstExpr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLASTConstExpr.h; sourceTree = "<group>"; }; > C2F4E7881E45AEDF006D7105 /* ComplexTextController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComplexTextController.cpp; sourceTree = "<group>"; }; > C2F4E7891E45AEDF006D7105 /* ComplexTextController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComplexTextController.h; sourceTree = "<group>"; }; > C330A22113EC196B0000B45B /* ColorChooser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorChooser.h; sourceTree = "<group>"; }; >@@ -25156,6 +25183,40 @@ > tabWidth = 4; > usesTabs = 0; > }; >+ C210E90D21B4BCA400B7F83D /* WHLSL */ = { >+ isa = PBXGroup; >+ children = ( >+ C2ECEB6421B7A7CF008F8DE9 /* WHLSLASTConstExpr.cpp */, >+ C2ECEB6521B7A7CF008F8DE9 /* WHLSLASTConstExpr.h */, >+ C2ECEB5521B64CAB008F8DE9 /* WHLSLASTEnumDef.cpp */, >+ C2ECEB5621B64CAB008F8DE9 /* WHLSLASTEnumDef.h */, >+ C2ECEB5721B64CBE008F8DE9 /* WHLSLASTFuncDef.cpp */, >+ C2ECEB5821B64CBE008F8DE9 /* WHLSLASTFuncDef.h */, >+ C2ECEB5921B64CD5008F8DE9 /* WHLSLASTNativeFuncDecl.cpp */, >+ C2ECEB5A21B64CD5008F8DE9 /* WHLSLASTNativeFuncDecl.h */, >+ C2ECEB5B21B64CE4008F8DE9 /* WHLSLASTNativeTypeDecl.cpp */, >+ C2ECEB5C21B64CE4008F8DE9 /* WHLSLASTNativeTypeDecl.h */, >+ C2ECEB5321B64C97008F8DE9 /* WHLSLASTStructDef.cpp */, >+ C2ECEB5421B64C97008F8DE9 /* WHLSLASTStructDef.h */, >+ C2ECEB5F21B64DC6008F8DE9 /* WHLSLASTType.cpp */, >+ C2ECEB6021B64DC6008F8DE9 /* WHLSLASTType.h */, >+ 1CC46F2921B77A32000998DE /* WHLSLASTTypeArgument.h */, >+ C2ECEB5121B64C84008F8DE9 /* WHLSLASTTypeDef.cpp */, >+ C2ECEB5221B64C84008F8DE9 /* WHLSLASTTypeDef.h */, >+ 1CC46F2621B77860000998DE /* WHLSLASTTypeRef.cpp */, >+ 1CC46F2721B77860000998DE /* WHLSLASTTypeRef.h */, >+ C2ECEB4F21B64C72008F8DE9 /* WHLSLASTVariableDecl.cpp */, >+ C2ECEB5021B64C72008F8DE9 /* WHLSLASTVariableDecl.h */, >+ C210E91121B4BD1000B7F83D /* WHLSLLexer.cpp */, >+ C210E91221B4BD1000B7F83D /* WHLSLLexer.h */, >+ C2ECEB4C21B63CBB008F8DE9 /* WHLSLParser.cpp */, >+ C2ECEB4D21B63CBB008F8DE9 /* WHLSLParser.h */, >+ C2ECEB5D21B64D6F008F8DE9 /* WHLSLProgram.cpp */, >+ C2ECEB5E21B64D6F008F8DE9 /* WHLSLProgram.h */, >+ ); >+ path = WHLSL; >+ sourceTree = "<group>"; >+ }; > C96F5EBF1B5872260091EA9D /* mediasession */ = { > isa = PBXGroup; > children = ( >@@ -25498,6 +25559,7 @@ > D00F593E216ECC43000D71DB /* webgpu */ = { > isa = PBXGroup; > children = ( >+ C210E90D21B4BCA400B7F83D /* WHLSL */, > D00F5941216ECC7A000D71DB /* DOMWindowWebGPU.cpp */, > D00F5940216ECC7A000D71DB /* DOMWindowWebGPU.h */, > D00F5942216ECC7A000D71DB /* DOMWindowWebGPU.idl */, >@@ -28011,8 +28073,8 @@ > CD318623199F1E2A0030A0F7 /* CDMPrivateMediaSourceAVFObjC.h in Headers */, > CDE595971BF26E2100A1CBE8 /* CDMSessionMediaSourceAVFObjC.h in Headers */, > 5FA904CA178E61F5004C8A2D /* CertificateInfo.h in Headers */, >- 91B8F0B521953D65000C2B00 /* CertificateInfoBase.h in Headers */, >- FE36FD1516C7826500F887C1 /* ChangeVersionData.h in Headers */, >+ 91B8F0B521953D65000C2B00 /* CertificateInfoBase.h in Headers */, >+ FE36FD1516C7826500F887C1 /* ChangeVersionData.h in Headers */, > 97BC69DD1505F076001B74AC /* ChangeVersionWrapper.h in Headers */, > FD315FFF12B0267600C1A359 /* ChannelMergerNode.h in Headers */, > FD31600212B0267600C1A359 /* ChannelSplitterNode.h in Headers */,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192355
:
356468
|
356569
|
356570
|
356585
|
356695
|
356778
|
356863
|
356947
|
357031
|
357035
|
357038
|
357081
|
357103
|
357199
|
357207
|
357225
|
357245
|
357268
|
357277
|
357303
|
357304
|
357361
|
357410
|
357430
|
357458
|
357520
|
357602
|
357749
|
357754
|
357765
|
357869
|
357889
|
357929
|
357932
|
357975
|
358866
|
358880
|
358902
|
359250