The patch has got in, but if you like, I can proposal a new version like the attached patches. (Need rebasing on latest Wine).
On Thu, Oct 2, 2014 at 7:26 PM, Qian Hong fracting@gmail.com wrote:
Hi Nikolay,
Thanks for commenting, your thought is helpful as usual :)
I added tests for more space separators, also added tests for parseFloat(): https://testbot.winehq.org/JobDetails.pl?Key=9203&log_206=1#k206
The test result show that, older version of jscript doesn't flow the standard, while newer version is much better. The test result also show that, BOM and other space separators are also ignored in functions like parseFloat. I'm planing on adding tests for the following group of functions.
parseInt() eval() isNaN() isFinite() new Number() new Function()
new Date() Date.parse()
RegExp()
My idea is fixing the code in lex.c first, then fixing other place using isspaceW in an incremental way with tests provided, like the attached patches demos.
Currently there are two troubles bothering me:
- We need a good way to skip space tests on older IEs
- We need a good way to reduce the length of WCHAR array for the
jscript code, I believe most of us hate a long array like below...
{'v','a','r',' ','a',' ','=',' ','p','a','r','s','e','F','l','o','a','t','(','"',SPACE_HOLDER,'3','.','1','4',SPACE_HOLDER,'"',')',';','o','k','(','a','=','=','3','.','1','4',',',' ','"','h','a','h','a','"',')',';','r','e','p','o','r','t','S','u','c','c','e','s','s','(',')',';','\0'}
Do you have any advice?
Thanks!