WebKit Bugzilla
Attachment 359142 Details for
Bug 193437
: [WHLSL] Implement the return checker and the unreachable code checker
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193437-20190114235450.patch (text/plain), 24.12 KB, created by
Myles C. Maxfield
on 2019-01-14 23:54:50 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Myles C. Maxfield
Created:
2019-01-14 23:54:50 PST
Size:
24.12 KB
patch
obsolete
>Subversion Revision: 239975 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index ad82af58c5fd3b6a1c8e97b7f0eaaaa39abe0f86..40a57a60f983a383f9fe09ed0d88365bfd817742 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,31 @@ >+2019-01-14 Myles C. Maxfield <mmaxfield@apple.com> >+ >+ [WHLSL] Implement the return checker and the unreachable code checker >+ https://bugs.webkit.org/show_bug.cgi?id=193437 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/ReturnChecker.mjs and >+ https://github.com/gpuweb/WHLSL/blob/master/Source/UnreachableCodeChecker.mjs into C++. >+ >+ No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort >+ of test. When enough of the compiler is present, I'll port the reference implementation's test suite. >+ >+ * Modules/webgpu/WHLSL/WHLSLReturnChecker.cpp: Added. >+ (WebCore::WHLSL::ReturnChecker::mergeReturnStyle): >+ (WebCore::WHLSL::ReturnChecker::isBoolCastFromLiteralTrue): >+ (WebCore::WHLSL::ReturnChecker::visit): >+ (WebCore::WHLSL::checkReturns): >+ * Modules/webgpu/WHLSL/WHLSLReturnChecker.h: Added. >+ (WebCore::WHLSL::ReturnChecker::ReturnChecker): >+ (WebCore::WHLSL::ReturnChecker::takeReturnStyle): >+ * Modules/webgpu/WHLSL/WHLSLUnreachableCodeChecker.cpp: Added. >+ (WebCore::WHLSL::UnreachableCodeChecker::UnreachableCodeChecker): >+ (WebCore::WHLSL::checkUnreachableCode): >+ * Modules/webgpu/WHLSL/WHLSLUnreachableCodeChecker.h: Added. >+ * Sources.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ > 2019-01-14 Myles C. Maxfield <mmaxfield@apple.com> > > [WHLSL] Implement the Type Checker >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLReturnChecker.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLReturnChecker.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..046f5f2b4c731f3a1f52bdf261f5caf050931f38 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLReturnChecker.cpp >@@ -0,0 +1,246 @@ >+/* >+ * Copyright (C) 2019 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. >+ */ >+ >+#include "config.h" >+#include "WHLSLReturnChecker.h" >+ >+#if ENABLE(WEBGPU) >+ >+#include "WHLSLCallExpression.h" >+#include "WHLSLDoWhileLoop.h" >+#include "WHLSLForLoop.h" >+#include "WHLSLIfStatement.h" >+#include "WHLSLIntrinsics.h" >+#include "WHLSLProgram.h" >+#include "WHLSLSwitchStatement.h" >+#include "WHLSLVisitor.h" >+#include "WHLSLWhileLoop.h" >+#include <wtf/Vector.h> >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+auto ReturnChecker::mergeReturnStyle(ReturnStyle a, ReturnStyle b) -> ReturnStyle >+{ >+ switch (a) { >+ case ReturnStyle::DefinitelyReturns: >+ case ReturnStyle::DefinitelyDoesntReturn: >+ if (a == b) >+ return a; >+ return ReturnStyle::HasntReturnedYet; >+ case ReturnStyle::HasntReturnedYet: >+ return ReturnStyle::HasntReturnedYet; >+ } >+} >+ >+bool ReturnChecker::isBoolCastFromLiteralTrue(AST::Expression& expression) >+{ >+ if (!is<AST::CallExpression>(expression)) >+ return false; >+ auto& callExpression = downcast<AST::CallExpression>(expression); >+ if (!callExpression.isCast()) >+ return false; >+ if (!matches(*callExpression.castReturnType(), m_intrinsics.boolType())) >+ return false; >+ if (callExpression.arguments().size() != 1) >+ return false; >+ auto& argument = static_cast<AST::Expression&>(callExpression.arguments()[0]); >+ if (!is<AST::BooleanLiteral>(argument)) >+ return false; >+ auto& booleanLiteral = downcast<AST::BooleanLiteral>(argument); >+ return booleanLiteral.value(); >+} >+ >+void ReturnChecker::visit(AST::FunctionDefinition& functionDefinition) >+{ >+ if (matches(functionDefinition.type(), m_intrinsics.voidType())) >+ return; >+ >+ checkErrorAndVisit(functionDefinition.block()); >+ if (error()) >+ return; >+ ASSERT(m_stack.size() == 1); >+ auto bodyValue = m_stack.last(); >+ if (bodyValue == ReturnStyle::DefinitelyDoesntReturn || bodyValue == ReturnStyle::HasntReturnedYet) >+ setError(); >+} >+ >+void ReturnChecker::visit(AST::Block& block) >+{ >+ for (auto& statement : block.statements()) { >+ checkErrorAndVisit(statement); >+ switch (m_stack.takeLast()) { >+ case ReturnStyle::DefinitelyReturns: >+ m_stack.append(ReturnStyle::DefinitelyReturns); >+ return; >+ case ReturnStyle::DefinitelyDoesntReturn: >+ m_stack.append(ReturnStyle::DefinitelyDoesntReturn); >+ return; >+ case ReturnStyle::HasntReturnedYet: >+ continue; >+ } >+ } >+ m_stack.append(ReturnStyle::HasntReturnedYet); >+} >+ >+void ReturnChecker::visit(AST::Break&) >+{ >+ m_stack.append(ReturnStyle::DefinitelyDoesntReturn); >+} >+ >+void ReturnChecker::visit(AST::Continue&) >+{ >+ // FIXME: This seems wrong. Consider a loop like: >+ // >+ // int foo() { for (;;) { continue; } } >+ // >+ // This program shouldn't claim that the problem is that it doesn't return. >+ // https://bugs.webkit.org/show_bug.cgi?id=177172 >+ m_stack.append(ReturnStyle::DefinitelyDoesntReturn); >+} >+ >+void ReturnChecker::visit(AST::DoWhileLoop& doWhileLoop) >+{ >+ checkErrorAndVisit(doWhileLoop.body()); >+ if (m_stack.takeLast() == ReturnStyle::DefinitelyReturns) { >+ m_stack.append(ReturnStyle::DefinitelyReturns); >+ return; >+ } >+ m_stack.append(ReturnStyle::HasntReturnedYet); >+} >+ >+void ReturnChecker::visit(AST::Fallthrough&) >+{ >+ // FIXME: Make sure this is right >+ m_stack.append(ReturnStyle::DefinitelyDoesntReturn); >+} >+ >+void ReturnChecker::visit(AST::ForLoop& forLoop) >+{ >+ checkErrorAndVisit(forLoop.body()); >+ auto bodyReturn = m_stack.takeLast(); >+ if (!forLoop.condition() || isBoolCastFromLiteralTrue(*forLoop.condition())) { >+ switch (bodyReturn) { >+ case ReturnStyle::DefinitelyReturns: >+ m_stack.append(ReturnStyle::DefinitelyReturns); >+ return; >+ case ReturnStyle::DefinitelyDoesntReturn: >+ case ReturnStyle::HasntReturnedYet: >+ m_stack.append(ReturnStyle::HasntReturnedYet); >+ return; >+ } >+ } >+ m_stack.append(ReturnStyle::HasntReturnedYet); >+} >+ >+void ReturnChecker::visit(AST::IfStatement& ifStatement) >+{ >+ if (ifStatement.elseBody()) { >+ checkErrorAndVisit(ifStatement.body()); >+ auto bodyValue = m_stack.takeLast(); >+ checkErrorAndVisit(*ifStatement.elseBody()); >+ auto elseValue = m_stack.takeLast(); >+ m_stack.append(mergeReturnStyle(bodyValue, elseValue)); >+ } >+ m_stack.append(ReturnStyle::HasntReturnedYet); >+} >+ >+void ReturnChecker::visit(AST::Return&) >+{ >+ m_stack.append(ReturnStyle::DefinitelyReturns); >+} >+ >+void ReturnChecker::visit(AST::SwitchStatement& switchStatement) >+{ >+ // FIXME: This seems like it's missing things. For example, we need to be smart about this: >+ // >+ // for (;;) { >+ // switch (...) { >+ // ... >+ // continue; // This continues the for loop >+ // } >+ // } >+ // >+ // I'm not sure what that means for this analysis. I'm starting to think that the right way to >+ // build this analysis is to run a visitor that builds a CFG and then analyze the CFG. >+ // https://bugs.webkit.org/show_bug.cgi?id=177172 >+ >+ Optional<ReturnStyle> returnStyle; >+ for (auto& switchCase : switchStatement.switchCases()) { >+ checkErrorAndVisit(switchCase.block()); >+ auto bodyStyle = m_stack.takeLast(); >+ // FIXME: The fact that we need this demonstrates the need for CFG analysis. >+ if (bodyStyle == ReturnStyle::DefinitelyDoesntReturn) >+ bodyStyle = ReturnStyle::HasntReturnedYet; >+ if (returnStyle) >+ returnStyle = mergeReturnStyle(*returnStyle, bodyStyle); >+ else >+ returnStyle = bodyStyle; >+ } >+ ASSERT(returnStyle); >+ m_stack.append(*returnStyle); >+} >+ >+void ReturnChecker::visit(AST::Trap&) >+{ >+ m_stack.append(ReturnStyle::DefinitelyReturns); >+} >+ >+void ReturnChecker::visit(AST::VariableDeclarationsStatement&) >+{ >+ m_stack.append(ReturnStyle::HasntReturnedYet); >+} >+ >+void ReturnChecker::visit(AST::WhileLoop& whileLoop) >+{ >+ checkErrorAndVisit(whileLoop.body()); >+ auto bodyReturn = m_stack.takeLast(); >+ if (isBoolCastFromLiteralTrue(whileLoop.conditional())) { >+ switch (bodyReturn) { >+ case ReturnStyle::DefinitelyReturns: >+ m_stack.append(ReturnStyle::DefinitelyReturns); >+ return; >+ case ReturnStyle::DefinitelyDoesntReturn: >+ case ReturnStyle::HasntReturnedYet: >+ m_stack.append(ReturnStyle::HasntReturnedYet); >+ return; >+ } >+ } >+ m_stack.append(ReturnStyle::HasntReturnedYet); >+} >+ >+bool checkReturns(Program& program) >+{ >+ ReturnChecker returnChecker(program.intrinsics()); >+ returnChecker.Visitor::visit(program); >+ return !returnChecker.error(); >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLReturnChecker.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLReturnChecker.h >new file mode 100644 >index 0000000000000000000000000000000000000000..c62aa3badf6e6dc9487e759f73a934fcfd0d9215 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLReturnChecker.h >@@ -0,0 +1,108 @@ >+/* >+ * Copyright (C) 2019 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 "WHLSLVisitor.h" >+#include <wtf/Vector.h> >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+namespace AST { >+ >+class Block; >+class Break; >+class Continue; >+class DoWhileLoop; >+class Expression; >+class Fallthrough; >+class ForLoop; >+class FunctionDefinition; >+class IfStatement; >+class Return; >+class SwitchStatement; >+class Trap; >+class VariableDeclarationsStatement; >+class WhileLoop; >+ >+} >+ >+class Intrinsics; >+class Program; >+ >+class ReturnChecker : public Visitor { >+public: >+ ReturnChecker(Intrinsics& intrinsics) >+ : m_intrinsics(intrinsics) >+ { >+ } >+ >+ virtual ~ReturnChecker() = default; >+ >+ enum class ReturnStyle { >+ DefinitelyReturns, >+ DefinitelyDoesntReturn, >+ HasntReturnedYet >+ }; >+ >+ ReturnStyle takeReturnStyle() >+ { >+ ASSERT(m_stack.size() == 1); >+ return m_stack.takeLast(); >+ } >+ >+private: >+ ReturnStyle mergeReturnStyle(ReturnStyle, ReturnStyle); >+ bool isBoolCastFromLiteralTrue(AST::Expression&); >+ >+ void visit(AST::FunctionDefinition&) override; >+ void visit(AST::Block&) override; >+ void visit(AST::Break&) override; >+ void visit(AST::Continue&) override; >+ void visit(AST::DoWhileLoop&) override; >+ void visit(AST::Fallthrough&) override; >+ void visit(AST::ForLoop&) override; >+ void visit(AST::IfStatement&) override; >+ void visit(AST::Return&) override; >+ void visit(AST::SwitchStatement&) override; >+ void visit(AST::Trap&) override; >+ void visit(AST::VariableDeclarationsStatement&) override; >+ void visit(AST::WhileLoop&) override; >+ >+ Intrinsics& m_intrinsics; >+ Vector<ReturnStyle> m_stack; >+}; >+ >+bool checkReturns(Program&); >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLUnreachableCodeChecker.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLUnreachableCodeChecker.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..80e1c7483c26b52bd8864e43cc9e9b4f12770540 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLUnreachableCodeChecker.cpp >@@ -0,0 +1,77 @@ >+/* >+ * Copyright (C) 2019 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. >+ */ >+ >+#include "config.h" >+#include "WHLSLUnreachableCodeChecker.h" >+ >+#if ENABLE(WEBGPU) >+ >+#include "WHLSLReturnChecker.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+class UnreachableCodeChecker : public Visitor { >+public: >+ UnreachableCodeChecker(Intrinsics& intrinsics) >+ : m_returnChecker(intrinsics) >+ { >+ } >+ >+ virtual ~UnreachableCodeChecker() = default; >+ >+private: >+ void visit(AST::Block& block) override >+ { >+ Visitor::visit(block); >+ for (size_t i = 0; i < block.statements().size() - 1; ++i) { >+ m_returnChecker.checkErrorAndVisit(block.statements()[i]); >+ switch (m_returnChecker.takeReturnStyle()) { >+ case ReturnChecker::ReturnStyle::DefinitelyReturns: >+ case ReturnChecker::ReturnStyle::DefinitelyDoesntReturn: >+ setError(); >+ return; >+ case ReturnChecker::ReturnStyle::HasntReturnedYet: >+ continue; >+ } >+ } >+ } >+ >+ ReturnChecker m_returnChecker; >+}; >+ >+bool checkUnreachableCode(Program& program) >+{ >+ UnreachableCodeChecker unreachableCodeChecker(program.intrinsics()); >+ unreachableCodeChecker.Visitor::visit(program); >+ return !unreachableCodeChecker.error(); >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLUnreachableCodeChecker.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLUnreachableCodeChecker.h >new file mode 100644 >index 0000000000000000000000000000000000000000..fe24a521f024bac2fcd32162eacfa78703c38cb4 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLUnreachableCodeChecker.h >@@ -0,0 +1,42 @@ >+/* >+ * Copyright (C) 2019 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; >+ >+bool checkUnreachableCode(Program&); >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 63f09611b682c18942163422f8cf035bb4280906..3c8b1b188b10208a4fbb54bd6e31392763e4b274 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -321,6 +321,8 @@ Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp > Modules/webgpu/WHLSL/WHLSLNameContext.cpp > Modules/webgpu/WHLSL/WHLSLNameResolver.cpp > Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp >+Modules/webgpu/WHLSL/WHLSLReturnChecker.cpp >+Modules/webgpu/WHLSL/WHLSLUnreachableCodeChecker.cpp > Modules/webgpu/WHLSL/WHLSLVisitor.cpp > Modules/webgpu/WHLSL/AST/WHLSLTypeArgument.cpp > Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 93a4a531cf43a399372cb887b1ce69d9f5026b8b..7cf1df250352a43e3417952ec534d03ffd3cc4c9 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -6413,14 +6413,18 @@ > 1C66260F1C6E7CA600AB527C /* FontFace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontFace.h; sourceTree = "<group>"; }; > 1C81B9560E97330800266E07 /* InspectorController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorController.h; sourceTree = "<group>"; }; > 1C81B9570E97330800266E07 /* InspectorController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorController.cpp; sourceTree = "<group>"; }; >+ 1C81B9580E97330800266E07 /* InspectorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorClient.h; sourceTree = "<group>"; }; >+ 1C840B7D21EBE0B800D0500D /* WHLSLEntryPointType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLEntryPointType.h; sourceTree = "<group>"; }; >+ 1C840B9021EC30F900D0500D /* WHLSLAddressSpace.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLAddressSpace.h; sourceTree = "<group>"; }; > 1C840B9721EC400700D0500D /* WHLSLChecker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLChecker.h; sourceTree = "<group>"; }; > 1C840B9921EC400800D0500D /* WHLSLGatherEntryPointItems.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLGatherEntryPointItems.cpp; sourceTree = "<group>"; }; > 1C840B9A21EC400900D0500D /* WHLSLGatherEntryPointItems.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLGatherEntryPointItems.h; sourceTree = "<group>"; }; > 1C840B9B21EC400900D0500D /* WHLSLChecker.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLChecker.cpp; sourceTree = "<group>"; }; >- 1C81B9580E97330800266E07 /* InspectorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorClient.h; sourceTree = "<group>"; }; >- 1C840B7D21EBE0B800D0500D /* WHLSLEntryPointType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLEntryPointType.h; sourceTree = "<group>"; }; >- 1C840B9021EC30F900D0500D /* WHLSLAddressSpace.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLAddressSpace.h; sourceTree = "<group>"; }; > 1C904DF90BA9D2C80081E9D0 /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; }; >+ 1C9AE5DE21EDB8440069D5F2 /* WHLSLReturnChecker.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLReturnChecker.cpp; sourceTree = "<group>"; }; >+ 1C9AE5DF21EDB8440069D5F2 /* WHLSLReturnChecker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLReturnChecker.h; sourceTree = "<group>"; }; >+ 1C9AE5E221EDC5540069D5F2 /* WHLSLUnreachableCodeChecker.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLUnreachableCodeChecker.cpp; sourceTree = "<group>"; }; >+ 1C9AE5E321EDC5540069D5F2 /* WHLSLUnreachableCodeChecker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLUnreachableCodeChecker.h; sourceTree = "<group>"; }; > 1CA19E030DC255950065A994 /* EventLoopMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EventLoopMac.mm; sourceTree = "<group>"; }; > 1CA19E150DC255CA0065A994 /* EventLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventLoop.h; sourceTree = "<group>"; }; > 1CAF347E0A6C405200ABE06E /* WebScriptObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptObject.h; sourceTree = "<group>"; }; >@@ -25442,6 +25446,8 @@ > C234A99921E90F29003C984D /* WHLSLResolveOverloadImpl.cpp */, > C234A99721E90F28003C984D /* WHLSLResolveOverloadImpl.h */, > C234A99D21E910BD003C984D /* WHLSLResolvingType.h */, >+ 1C9AE5DE21EDB8440069D5F2 /* WHLSLReturnChecker.cpp */, >+ 1C9AE5DF21EDB8440069D5F2 /* WHLSLReturnChecker.h */, > C21BF74521CD969800227979 /* WHLSLStandardLibrary.txt */, > C234A9A921E92C17003C984D /* WHLSLSynthesizeArrayOperatorLength.cpp */, > C234A9AF21E92C1B003C984D /* WHLSLSynthesizeArrayOperatorLength.h */, >@@ -25451,6 +25457,8 @@ > C234A9AC21E92C19003C984D /* WHLSLSynthesizeEnumerationFunctions.h */, > C234A9B421E92C22003C984D /* WHLSLSynthesizeStructureAccessors.cpp */, > C234A9B521E92C23003C984D /* WHLSLSynthesizeStructureAccessors.h */, >+ 1C9AE5E221EDC5540069D5F2 /* WHLSLUnreachableCodeChecker.cpp */, >+ 1C9AE5E321EDC5540069D5F2 /* WHLSLUnreachableCodeChecker.h */, > C234A98521E886A9003C984D /* WHLSLVisitor.cpp */, > C234A98721E886AD003C984D /* WHLSLVisitor.h */, > );
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 193437
:
359140
| 359142