[WHLSL] Remove useless code in NameResolver
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Aug 2018 20:08:08 +0000 (20:08 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Aug 2018 20:08:08 +0000 (20:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189176

Reviewed by Dean Jackson and Thomas Denney.

The check will always pass becase the standard library contains at least one function with the correct name.

* WebGPUShadingLanguageRI/NameResolver.js:
(NameResolver.prototype.visitDotExpression):
(NameResolver.prototype._handlePropertyAccess): Deleted.
(NameResolver.prototype.visitIndexExpression): Deleted.

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

Tools/ChangeLog
Tools/WebGPUShadingLanguageRI/NameResolver.js

index 7429de5..7a499fd 100644 (file)
@@ -1,3 +1,17 @@
+2018-08-31  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        [WHLSL] Remove useless code in NameResolver
+        https://bugs.webkit.org/show_bug.cgi?id=189176
+
+        Reviewed by Dean Jackson and Thomas Denney.
+
+        The check will always pass becase the standard library contains at least one function with the correct name.
+
+        * WebGPUShadingLanguageRI/NameResolver.js:
+        (NameResolver.prototype.visitDotExpression):
+        (NameResolver.prototype._handlePropertyAccess): Deleted.
+        (NameResolver.prototype.visitIndexExpression): Deleted.
+
 2018-08-31  Simon Fraser  <simon.fraser@apple.com>
 
         Make it possible to mark tests as leaks in TestExpectations
index 9a099f4..a5da2ca 100644 (file)
@@ -166,16 +166,6 @@ class NameResolver extends Visitor {
         super.visitReturn(node);
     }
     
-    _handlePropertyAccess(node)
-    {
-        node.possibleGetOverloads = this._nameContext.get(Func, node.getFuncName);
-        node.possibleSetOverloads = this._nameContext.get(Func, node.setFuncName);
-        node.possibleAndOverloads = this._nameContext.get(Func, node.andFuncName);
-
-        if (!node.possibleGetOverloads && !node.possibleAndOverloads)
-            throw new WTypeError(node.origin.originString, "Cannot find either " + node.getFuncName + " or " + node.andFuncName);
-    }
-    
     visitDotExpression(node)
     {
         // This could be a reference to an enum. Let's resolve that now.
@@ -190,16 +180,9 @@ class NameResolver extends Visitor {
             }
         }
         
-        this._handlePropertyAccess(node);
         super.visitDotExpression(node);
     }
     
-    visitIndexExpression(node)
-    {
-        this._handlePropertyAccess(node);
-        super.visitIndexExpression(node);
-    }
-    
     visitCallExpression(node)
     {
         let funcs = this._nameContext.get(Func, node.name);