Title: [222172] trunk/Tools
Revision
222172
Author
[email protected]
Date
2017-09-18 11:57:29 -0700 (Mon, 18 Sep 2017)

Log Message

WSL cannot use typedefs of arrays
https://bugs.webkit.org/show_bug.cgi?id=177061

Reviewed by Saam Barati.
        
This test case didn't work before because of a missing visit call in Checker.

* WebGPUShadingLanguageRI/Checker.js:
(Checker.prototype.visitTypeRef):
* WebGPUShadingLanguageRI/Test.js:
(TEST_typedefArray):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (222171 => 222172)


--- trunk/Tools/ChangeLog	2017-09-18 18:56:39 UTC (rev 222171)
+++ trunk/Tools/ChangeLog	2017-09-18 18:57:29 UTC (rev 222172)
@@ -1,3 +1,17 @@
+2017-09-18  Filip Pizlo  <[email protected]>
+
+        WSL cannot use typedefs of arrays
+        https://bugs.webkit.org/show_bug.cgi?id=177061
+
+        Reviewed by Saam Barati.
+        
+        This test case didn't work before because of a missing visit call in Checker.
+
+        * WebGPUShadingLanguageRI/Checker.js:
+        (Checker.prototype.visitTypeRef):
+        * WebGPUShadingLanguageRI/Test.js:
+        (TEST_typedefArray):
+
 2017-09-18  Youenn Fablet  <[email protected]>
 
         Allow WTF::map to use any class that is iterable and has a size getter

Modified: trunk/Tools/WebGPUShadingLanguageRI/Checker.js (222171 => 222172)


--- trunk/Tools/WebGPUShadingLanguageRI/Checker.js	2017-09-18 18:56:39 UTC (rev 222171)
+++ trunk/Tools/WebGPUShadingLanguageRI/Checker.js	2017-09-18 18:57:29 UTC (rev 222172)
@@ -99,6 +99,7 @@
     {
         if (!node.type)
             throw new Error("Type reference without a type in checker: " + node + " at " + node.origin);
+        node.type.visit(this);
         this._checkTypeArguments(node.origin, node.type.typeParameters, node.typeArguments);
     }
     

Modified: trunk/Tools/WebGPUShadingLanguageRI/Test.js (222171 => 222172)


--- trunk/Tools/WebGPUShadingLanguageRI/Test.js	2017-09-18 18:56:39 UTC (rev 222171)
+++ trunk/Tools/WebGPUShadingLanguageRI/Test.js	2017-09-18 18:57:29 UTC (rev 222172)
@@ -3635,6 +3635,19 @@
     checkBool(program, callFunction(program, "foo8", [], []), false);
 }
 
+function TEST_typedefArray()
+{
+    let program = doPrep(`
+        typedef ArrayTypedef = int[2];
+        int foo()
+        {
+            ArrayTypedef arrayTypedef;
+            return arrayTypedef[0];
+        }
+    `);
+    checkInt(program, callFunction(program, "foo", [], []), 0);
+}
+
 let filter = /.*/; // run everything by default
 if (this["arguments"]) {
     for (let i = 0; i < arguments.length; i++) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to