Title: [242067] trunk/Source/_javascript_Core
- Revision
- 242067
- Author
- [email protected]
- Date
- 2019-02-25 18:59:47 -0800 (Mon, 25 Feb 2019)
Log Message
[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:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (242066 => 242067)
--- trunk/Source/_javascript_Core/ChangeLog 2019-02-26 02:55:03 UTC (rev 242066)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-02-26 02:59:47 UTC (rev 242067)
@@ -1,5 +1,27 @@
2019-02-25 Yusuke Suzuki <[email protected]>
+ [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:
+
+2019-02-25 Yusuke Suzuki <[email protected]>
+
[JSC] Make Intl fields lazily-allocated
https://bugs.webkit.org/show_bug.cgi?id=195022
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm (242066 => 242067)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2019-02-26 02:55:03 UTC (rev 242066)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2019-02-26 02:59:47 UTC (rev 242067)
@@ -2302,6 +2302,16 @@
storei t3, JSLexicalEnvironment_variables + PayloadOffset[t0, t1, 8]
end
+ macro checkTDZInGlobalPutToScopeIfNecessary()
+ loadi OpPutToScope::Metadata::m_getPutInfo + GetPutInfo::m_operand[t5], t0
+ andi InitializationModeMask, t0
+ rshifti InitializationModeShift, t0
+ bineq t0, NotInitialization, .noNeedForTDZCheck
+ loadp OpPutToScope::Metadata::m_operand[t5], t0
+ loadi TagOffset[t0], t0
+ bieq t0, EmptyValueTag, .pDynamic
+ .noNeedForTDZCheck:
+ end
metadata(t5, t0)
loadi OpPutToScope::Metadata::m_getPutInfo + GetPutInfo::m_operand[t5], t0
@@ -2329,6 +2339,7 @@
.pGlobalLexicalVar:
bineq t0, GlobalLexicalVar, .pClosureVar
+ checkTDZInGlobalPutToScopeIfNecessary()
putGlobalVariable()
writeBarrierOnGlobalLexicalEnvironment(size, get, m_value)
dispatch()
@@ -2357,6 +2368,7 @@
.pGlobalLexicalVarWithVarInjectionChecks:
bineq t0, GlobalLexicalVarWithVarInjectionChecks, .pClosureVarWithVarInjectionChecks
varInjectionCheck(.pDynamic)
+ checkTDZInGlobalPutToScopeIfNecessary()
putGlobalVariable()
writeBarrierOnGlobalLexicalEnvironment(size, get, m_value)
dispatch()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes