WSL prepare() should cache the parsed standard library
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Sep 2017 03:19:22 +0000 (03:19 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Sep 2017 03:19:22 +0000 (03:19 +0000)
commitf7a8204dd17b1a4cc1ee87c94a4a70b8a9be7bfc
tree0db9f25029aa96eda4265ef5de85d994d82cce44
parentc056c081861e22cd433bbe6c333644c278b45c30
WSL prepare() should cache the parsed standard library
https://bugs.webkit.org/show_bug.cgi?id=177118

Reviewed by Myles Maxfield.

The execution time of Test.js is too damn high!

So I made it 2x faster by caching the parsed standard library.

* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/CloneProgram.js: Added.
(cloneProgram):
* WebGPUShadingLanguageRI/Prepare.js:
(let.prepare):
(prepare): Deleted.
* WebGPUShadingLanguageRI/StatementCloner.js: Added.
(StatementCloner.prototype.visitFuncDef):
(StatementCloner.prototype.visitNativeFunc):
(StatementCloner.prototype.visitNativeType):
(StatementCloner.prototype.visitTypeDef):
(StatementCloner.prototype.visitStructType):
(StatementCloner.prototype.visitConstexprTypeParameter):
(StatementCloner.prototype.visitProtocolDecl):
* WebGPUShadingLanguageRI/Test.html:
* WebGPUShadingLanguageRI/Test.js:
(doTest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/WebGPUShadingLanguageRI/All.js
Tools/WebGPUShadingLanguageRI/CloneProgram.js [new file with mode: 0644]
Tools/WebGPUShadingLanguageRI/Prepare.js
Tools/WebGPUShadingLanguageRI/StatementCloner.js [new file with mode: 0644]
Tools/WebGPUShadingLanguageRI/Test.html
Tools/WebGPUShadingLanguageRI/Test.js