WebKit Bugzilla
Attachment 359130 Details for
Bug 193432
: [WHLSL] Add the high zombie finder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193432-20190114205925.patch (text/plain), 8.36 KB, created by
Myles C. Maxfield
on 2019-01-14 20:59:25 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Myles C. Maxfield
Created:
2019-01-14 20:59:25 PST
Size:
8.36 KB
patch
obsolete
>Subversion Revision: 239973 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index d270af322118c720bc47256425e78e33f6f3af6c..33551485cd4494f9fdf6e867462ee13188ad8c94 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-01-14 Myles C. Maxfield <mmaxfield@apple.com> >+ >+ [WHLSL] Add the high zombie finder >+ https://bugs.webkit.org/show_bug.cgi?id=193432 >+ >+ This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/HighZombieFinder.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/WHLSLHighZombieFinder.cpp: Added. >+ (WebCore::WHLSL::findHighZombies): >+ * Modules/webgpu/WHLSL/WHLSLHighZombieFinder.h: Added. >+ * Sources.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ > 2019-01-14 Simon Fraser <simon.fraser@apple.com> > > Only run the node comparison code in FrameSelection::respondToNodeModification() for range selections >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..4b4591ff74bda6414e41f638abd9e14fa7e1bb5e >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp >@@ -0,0 +1,71 @@ >+/* >+ * 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 "WHLSLHighZombieFinder.h" >+ >+#if ENABLE(WEBGPU) >+ >+#include "WHLSLVisitor.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+class HighZombieFinder : public Visitor { >+public: >+ HighZombieFinder() = default; >+ >+ virtual ~HighZombieFinder() = default; >+ >+private: >+ void visit(AST::DotExpression&) override >+ { >+ setError(); >+ } >+ >+ void visit(AST::IndexExpression&) override >+ { >+ setError(); >+ } >+ >+ void visit(AST::ReadModifyWriteExpression&) override >+ { >+ setError(); >+ } >+}; >+ >+bool findHighZombies(Program& program) >+{ >+ HighZombieFinder highZombieFinder; >+ highZombieFinder.Visitor::visit(program); >+ return !highZombieFinder.error(); >+} >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLHighZombieFinder.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLHighZombieFinder.h >new file mode 100644 >index 0000000000000000000000000000000000000000..aeb4ddaf080588c1afc2c8acc2c247f55dcc594f >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLHighZombieFinder.h >@@ -0,0 +1,46 @@ >+/* >+ * 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 "WHLSLFunctionAttribute.h" >+#include "WHLSLSemantic.h" >+#include "WHLSLTypeArgument.h" >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+class Program; >+ >+bool findHighZombies(Program&); >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 0d256353d74abd62663024bd8054c950e0738103..24c7cd060697f988c90b09a6085eece1d019b1cd 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -320,6 +320,7 @@ Modules/webgpu/WHLSL/WHLSLNameContext.cpp > Modules/webgpu/WHLSL/WHLSLNameResolver.cpp > Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp > Modules/webgpu/WHLSL/WHLSLVisitor.cpp >+Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp > Modules/webgpu/WHLSL/AST/WHLSLTypeArgument.cpp > Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.cpp > Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index f2f515a4e43e519f4f349474e71492539bf848fc..a7a2c8879b602a223834072e121d9f8a8f6ebcbd 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -6417,6 +6417,8 @@ > 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>"; }; >+ 1C9AE5CA21ED9DF50069D5F2 /* WHLSLHighZombieFinder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLHighZombieFinder.cpp; sourceTree = "<group>"; }; >+ 1C9AE5CB21ED9DF50069D5F2 /* WHLSLHighZombieFinder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLHighZombieFinder.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>"; }; >@@ -25416,6 +25418,8 @@ > C21BF6F121CD898D00227979 /* AST */, > C234A9B221E92C1F003C984D /* WHLSLCheckDuplicateFunctions.cpp */, > C234A9AE21E92C1A003C984D /* WHLSLCheckDuplicateFunctions.h */, >+ 1C9AE5CA21ED9DF50069D5F2 /* WHLSLHighZombieFinder.cpp */, >+ 1C9AE5CB21ED9DF50069D5F2 /* WHLSLHighZombieFinder.h */, > C234A99A21E90F56003C984D /* WHLSLInferTypes.cpp */, > C234A99B21E90F57003C984D /* WHLSLInferTypes.h */, > C234A9B721E92CC1003C984D /* WHLSLIntrinsics.cpp */,
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 193432
:
359130
|
359218
|
359247
|
359255