[JSC] stress/function-constructor-reading-from-global-lexical-environment.js fails...
authorysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2019 02:59:47 +0000 (02:59 +0000)
committerysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2019 02:59:47 +0000 (02:59 +0000)
commit2d48df4b5855e4bb02dd1805f57d0b968ad13e7b
tree459c9d36e120449b685075f8b0196a277c6d46ed
parent308a94d85c6d13a13b93032fbadaf2a772b00f12
[JSC] stress/function-constructor-reading-from-global-lexical-environment.js fails in 32bit arch
https://bugs.webkit.org/show_bug.cgi?id=195030
<rdar://problem/48385088>

Reviewed by Saam Barati.

While LLInt64 has checkTDZInGlobalPutToScopeIfNecessary for op_put_to_scope GlobalLexicalVar to check the value in the variable slot is not empty,
this check is missing in LLInt32_64. Previously, this check was subsumed accidentally by the WatchpointSet check in GlobalLexicalVar in `notifyWrite`:
because no "put" attempt succeeds here, the status WatchpointSet was ClearWatchpoint, we always go to the slow path, and we always throw the TDZ error
before configuring the WatchpointSet in the slow path. But after r241862, WatchpointSet is not used under non-JIT configuration. This skips WatchpointSet
check and LLInt32_64 starts failing tests because of lack of checkTDZInGlobalPutToScopeIfNecessary. This patch adds checkTDZInGlobalPutToScopeIfNecessary
in LLInt32_64 too. This patch fixes the following four failing tests.

    stress/function-constructor-reading-from-global-lexical-environment.js.bytecode-cache
    stress/function-constructor-reading-from-global-lexical-environment.js.default
    stress/global-lexical-variable-tdz.js.bytecode-cache
    stress/global-lexical-variable-tdz.js.default

* llint/LowLevelInterpreter32_64.asm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm