[PATCH 4/4] jscript: Support nested scopes for functions defined inside.

Jacek Caban jacek at codeweavers.com
Mon Jun 14 13:17:58 CDT 2021


Hi Paul,

On 6/11/21 7:46 PM, Paul Gofman wrote:
> Signed-off-by: Paul Gofman<pgofman at codeweavers.com>
> ---
>   dlls/jscript/compile.c   | 34 +++++++++++++++++++++--
>   dlls/jscript/engine.c    | 59 +++++++++++++++++++++++++++++++++++++--
>   dlls/jscript/engine.h    |  2 ++
>   dlls/jscript/parser.h    |  1 +
>   dlls/jscript/parser.y    |  1 +
>   dlls/mshtml/tests/es5.js | 60 ++++++++++++++++++++++++++++++++++++++--
>   6 files changed, 150 insertions(+), 7 deletions(-)


It would be nice to have tests for more interesting cases. I attached a 
test shows scope chain life time and it's failing for me with your patches.

While writing the test, I also noticed that 'let' inside 'for' statement 
doesn't work, for example:
for(let i = ...; ...)

Thanks,
Jacek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.diff
Type: text/x-patch
Size: 709 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210614/6ff081f6/attachment.bin>


More information about the wine-devel mailing list