[WHLSL] Call expressions shouldn't have type arguments
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2018 23:28:35 +0000 (23:28 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2018 23:28:35 +0000 (23:28 +0000)
commit76c653368b5695db0fdb07bb87d1960d6be8a574
tree8b6845dd45dc85effd4a64f498ce9b6dbb50d95a
parentfe6d3b535ced80015081138fbb1ff49c7d3e89a6
[WHLSL] Call expressions shouldn't have type arguments
https://bugs.webkit.org/show_bug.cgi?id=188770

Reviewed by Filip Pizlo.

Call expressions only had type arguments for casts, becuase native types can have type arguments.
However, instead of putting those type arguments on the CallExpression, we should parse the casted
type as a real type and not as an identifier, which puts the type arguments in the TypeRef.

Test: casts

* WebGPUShadingLanguageRI/CallExpression.js:
(CallExpression):
(CallExpression.prototype.get name):
(CallExpression.resolve):
(CallExpression.prototype.get typeArguments): Deleted.
(CallExpression.prototype.becomeCast): Deleted.
* WebGPUShadingLanguageRI/NameResolver.js:
(NameResolver.prototype.visitCallExpression):
* WebGPUShadingLanguageRI/Parse.js:
(parseConstexpr):
(parseTypeDef):
(parseLeftOperatorCall):
(parseCallExpression.let.parseArguments):
(parsePossiblePrefix):
(parsePossibleRelationalEquality):
(parseLeftLogicalExpression):
(parseIfStatement):
(parseWhile):
(parseFor):
(parseDo):
* WebGPUShadingLanguageRI/RemoveTypeArguments.js:
* WebGPUShadingLanguageRI/Rewriter.js:
(Rewriter.prototype.visitCallExpression):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/WebGPUShadingLanguageRI/CallExpression.js
Tools/WebGPUShadingLanguageRI/NameResolver.js
Tools/WebGPUShadingLanguageRI/Parse.js
Tools/WebGPUShadingLanguageRI/RemoveTypeArguments.js
Tools/WebGPUShadingLanguageRI/Rewriter.js
Tools/WebGPUShadingLanguageRI/Test.js