Unreviewed, rolling out r246524.
authortsavell@apple.com <tsavell@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jun 2019 16:44:36 +0000 (16:44 +0000)
committertsavell@apple.com <tsavell@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jun 2019 16:44:36 +0000 (16:44 +0000)
Caused 45 webgpu/ crashes.

Reverted changeset:

"[WHLSL] The name resolver does not deal with
nativeFunctionDeclaration"
https://bugs.webkit.org/show_bug.cgi?id=198306
https://trac.webkit.org/changeset/246524

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246543 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameResolver.cpp
Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameResolver.h
Source/WebCore/Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt

index 076e0a3..c11f61a 100644 (file)
@@ -1,3 +1,16 @@
+2019-06-18  Truitt Savell  <tsavell@apple.com>
+
+        Unreviewed, rolling out r246524.
+
+        Caused 45 webgpu/ crashes.
+
+        Reverted changeset:
+
+        "[WHLSL] The name resolver does not deal with
+        nativeFunctionDeclaration"
+        https://bugs.webkit.org/show_bug.cgi?id=198306
+        https://trac.webkit.org/changeset/246524
+
 2019-06-18  Zalan Bujtas  <zalan@apple.com>
 
         [LFC][IFC] Inline quirks should have their dedicated class.
index c800429..21ca18d 100644 (file)
@@ -94,16 +94,6 @@ void NameResolver::visit(AST::FunctionDefinition& functionDefinition)
     newNameResolver.checkErrorAndVisit(functionDefinition.block());
 }
 
-void NameResolver::visit(AST::NativeFunctionDeclaration& nativeFunctionDeclaration)
-{
-    NameContext newNameContext(&m_nameContext);
-    NameResolver newNameResolver(newNameContext);
-    newNameResolver.setCurrentFunctionDefinition(m_currentFunction);
-    checkErrorAndVisit(nativeFunctionDeclaration.type());
-    for (auto& parameter : nativeFunctionDeclaration.parameters())
-        newNameResolver.checkErrorAndVisit(parameter);
-}
-
 void NameResolver::visit(AST::Block& block)
 {
     NameContext nameContext(&m_nameContext);
index 89f0866..8fb4a34 100644 (file)
@@ -43,14 +43,14 @@ public:
 
     virtual ~NameResolver() = default;
 
+    void visit(AST::FunctionDefinition&) override;
+
     void setCurrentFunctionDefinition(AST::FunctionDefinition* functionDefinition)
     {
         m_currentFunction = functionDefinition;
     }
 
 private:
-    void visit(AST::FunctionDefinition&) override;
-    void visit(AST::NativeFunctionDeclaration&) override;
     void visit(AST::TypeReference&) override;
     void visit(AST::Block&) override;
     void visit(AST::IfStatement&) override;
index ec28410..0749481 100644 (file)
@@ -625,7 +625,4 @@ operator float4(float x, float y, float z, float w) {
     return result;
 }
 
-native ushort Sample(Texture1D<ushort>, sampler, float location);
-native ushort Sample(Texture1D<ushort>, sampler, float location, int offset);
-
 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=192890 Insert the rest of the standard library once the parser is fast enough