[WSL] Cannot put templated structs inside structs
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Sep 2017 04:15:56 +0000 (04:15 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Sep 2017 04:15:56 +0000 (04:15 +0000)
commit943b7271c2cb3cd1781abc99ae5c37c8cef315c4
treebb0001a6691eb2a6e02269f01e130dfc54c904c4
parent097bfd886d88ccc13cf19f70de5192519d5cfbfa
[WSL] Cannot put templated structs inside structs
https://bugs.webkit.org/show_bug.cgi?id=177120

Reviewed by Myles Maxfield.

It turns out that we still need to instantiate structs even if not passing type arguments,
since its fields may need to be instantiated.

This makes Myles's test case pass. When writing the test case, I encountered parser bugs, and
I fixed them.

* WebGPUShadingLanguageRI/CallFunction.js:
(callFunction):
* WebGPUShadingLanguageRI/Checker.js:
(Checker.prototype.visitReferenceType):
* WebGPUShadingLanguageRI/FuncInstantiator.js:
(FuncInstantiator.prototype.getUnique):
(FuncInstantiator):
* WebGPUShadingLanguageRI/Parse.js:
(parseSuffixOperator):
(parsePossibleSuffix):
(parsePostIncrement):
* WebGPUShadingLanguageRI/StructType.js:
(StructType.prototype.instantiate):
* WebGPUShadingLanguageRI/Test.js:
(checkNumber):
(checkEnum):
(TEST_instantiateStructInStruct):
* WebGPUShadingLanguageRI/TypeRef.js:
(TypeRef.prototype.get instantiatedType):
(TypeRef.prototype.get isPrimitive):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/WebGPUShadingLanguageRI/CallFunction.js
Tools/WebGPUShadingLanguageRI/Checker.js
Tools/WebGPUShadingLanguageRI/FuncInstantiator.js
Tools/WebGPUShadingLanguageRI/Parse.js
Tools/WebGPUShadingLanguageRI/StructType.js
Tools/WebGPUShadingLanguageRI/Test.js
Tools/WebGPUShadingLanguageRI/TypeRef.js