Changeset 242067 in webkit
- Timestamp:
- Feb 25, 2019 6:59:47 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r242064 r242067 1 2019-02-25 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] stress/function-constructor-reading-from-global-lexical-environment.js fails in 32bit arch 4 https://bugs.webkit.org/show_bug.cgi?id=195030 5 <rdar://problem/48385088> 6 7 Reviewed by Saam Barati. 8 9 While LLInt64 has checkTDZInGlobalPutToScopeIfNecessary for op_put_to_scope GlobalLexicalVar to check the value in the variable slot is not empty, 10 this check is missing in LLInt32_64. Previously, this check was subsumed accidentally by the WatchpointSet check in GlobalLexicalVar in `notifyWrite`: 11 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 12 before configuring the WatchpointSet in the slow path. But after r241862, WatchpointSet is not used under non-JIT configuration. This skips WatchpointSet 13 check and LLInt32_64 starts failing tests because of lack of checkTDZInGlobalPutToScopeIfNecessary. This patch adds checkTDZInGlobalPutToScopeIfNecessary 14 in LLInt32_64 too. This patch fixes the following four failing tests. 15 16 stress/function-constructor-reading-from-global-lexical-environment.js.bytecode-cache 17 stress/function-constructor-reading-from-global-lexical-environment.js.default 18 stress/global-lexical-variable-tdz.js.bytecode-cache 19 stress/global-lexical-variable-tdz.js.default 20 21 * llint/LowLevelInterpreter32_64.asm: 22 1 23 2019-02-25 Yusuke Suzuki <ysuzuki@apple.com> 2 24 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
r241862 r242067 2303 2303 end 2304 2304 2305 macro checkTDZInGlobalPutToScopeIfNecessary() 2306 loadi OpPutToScope::Metadata::m_getPutInfo + GetPutInfo::m_operand[t5], t0 2307 andi InitializationModeMask, t0 2308 rshifti InitializationModeShift, t0 2309 bineq t0, NotInitialization, .noNeedForTDZCheck 2310 loadp OpPutToScope::Metadata::m_operand[t5], t0 2311 loadi TagOffset[t0], t0 2312 bieq t0, EmptyValueTag, .pDynamic 2313 .noNeedForTDZCheck: 2314 end 2305 2315 2306 2316 metadata(t5, t0) … … 2330 2340 .pGlobalLexicalVar: 2331 2341 bineq t0, GlobalLexicalVar, .pClosureVar 2342 checkTDZInGlobalPutToScopeIfNecessary() 2332 2343 putGlobalVariable() 2333 2344 writeBarrierOnGlobalLexicalEnvironment(size, get, m_value) … … 2358 2369 bineq t0, GlobalLexicalVarWithVarInjectionChecks, .pClosureVarWithVarInjectionChecks 2359 2370 varInjectionCheck(.pDynamic) 2371 checkTDZInGlobalPutToScopeIfNecessary() 2360 2372 putGlobalVariable() 2361 2373 writeBarrierOnGlobalLexicalEnvironment(size, get, m_value)
Note: See TracChangeset
for help on using the changeset viewer.