Changeset 179863 in webkit
- Timestamp:
- Feb 9, 2015, 8:46:53 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGStackLayoutPhase.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r179862 r179863 1 2015-02-09 Filip Pizlo <fpizlo@apple.com> 2 3 DFG::StackLayoutPhase should always set the scopeRegister to VirtualRegister() because the DFG doesn't do anything to make its value valid 4 https://bugs.webkit.org/show_bug.cgi?id=141412 5 6 Reviewed by Michael Saboff. 7 8 StackLayoutPhase was attempting to ensure that the register that 9 CodeBlock::scopeRegister() points to is the right one for the DFG. But the DFG did nothing 10 else to maintain the validity of the scopeRegister(). It wasn't captured as far as I can 11 tell. StackLayoutPhase didn't explicitly mark it live. PreciseLocalClobberize didn't mark 12 it as being live. So, by the time we got here the register referred to by 13 CodeBlock::scopeRegister() would have been junk. Moreover, CodeBlock::scopeRegister() was 14 not used for DFG code blocks, and was hardly ever used outside of bytecode generation. 15 16 So, this patch just removes the code to manipulate this field and replaces it with an 17 unconditional setScopeRegister(VirtualRegister()). Setting it to the invalid register 18 ensures that any attempst to read the scopeRegister in a DFG or FTL frame immediately 19 punts. 20 21 * dfg/DFGStackLayoutPhase.cpp: 22 (JSC::DFG::StackLayoutPhase::run): 23 1 24 2015-02-09 Filip Pizlo <fpizlo@apple.com> 2 25 -
trunk/Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp
r179015 r179863 169 169 } 170 170 171 if (codeBlock()->scopeRegister().isValid()) { 172 unsigned scopeRegisterAllocation = allocation[codeBlock()->scopeRegister().toLocal()]; 173 codeBlock()->setScopeRegister(scopeRegisterAllocation == UINT_MAX ? VirtualRegister() : virtualRegisterForLocal(scopeRegisterAllocation)); 174 } 171 // This register is never valid for DFG code blocks. 172 codeBlock()->setScopeRegister(VirtualRegister()); 175 173 176 174 for (unsigned i = m_graph.m_inlineVariableData.size(); i--;) {
Note:
See TracChangeset
for help on using the changeset viewer.