Changeset 182745 in webkit
- Timestamp:
- Apr 13, 2015, 11:08:33 AM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r182668 r182745 1 2015-04-13 Mark Lam <mark.lam@apple.com> 2 3 DFG inlining of op_call_varargs should keep the callee alive in case of OSR exit. 4 https://bugs.webkit.org/show_bug.cgi?id=143407 5 6 Reviewed by Filip Pizlo. 7 8 DFG inlining of a varargs call / construct needs to keep the local 9 containing the callee alive with a Phantom node because the LoadVarargs 10 node may OSR exit. After the OSR exit, the baseline JIT executes the 11 op_call_varargs with that callee in the local. 12 13 Previously, because that callee local was not explicitly kept alive, 14 the op_call_varargs case can OSR exit a DFG function and leave an 15 undefined value in that local. As a result, the baseline observes the 16 side effect of an op_call_varargs on an undefined value instead of the 17 function it expected. 18 19 Note: this issue does not manifest with op_construct_varargs because 20 the inlined constructor will have an op_create_this which operates on 21 the incoming callee value, thereby keeping it alive. 22 23 * dfg/DFGByteCodeParser.cpp: 24 (JSC::DFG::ByteCodeParser::handleInlining): 25 * tests/stress/call-varargs-with-different-arguments-length-after-warmup.js: Added. 26 (foo): 27 (Foo): 28 (doTest): 29 1 30 2015-04-12 Yusuke Suzuki <utatane.tea@gmail.com> 2 31 -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r182433 r182745 1571 1571 1572 1572 addToGraph(LoadVarargs, OpInfo(data), get(argumentsArgument)); 1573 1573 1574 // LoadVarargs may OSR exit. Hence, we need to keep alive callTargetNode, thisArgument 1575 // and argumentsArgument for the baseline JIT. However, we only need a Phantom for 1576 // callTargetNode because the other 2 are still in use and alive at this point. 1577 addToGraph(Phantom, callTargetNode); 1578 1574 1579 // In DFG IR before SSA, we cannot insert control flow between after the 1575 1580 // LoadVarargs and the last SetArgument. This isn't a problem once we get to DFG
Note:
See TracChangeset
for help on using the changeset viewer.