Changeset 191175 in webkit
- Timestamp:
- Oct 16, 2015 7:43:02 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r191173 r191175 1 2015-10-15 Michael Saboff <msaboff@apple.com> 2 3 REGRESSION (r190289): Repro crash clicking back button on netflix.com 4 https://bugs.webkit.org/show_bug.cgi?id=150220 5 6 Reviewed by Geoffrey Garen. 7 8 Added a new regression test. Changed the expected output of caller-property 9 to correspond with tail calls enabled. 10 11 * js/caller-property-expected.txt: 12 * js/regress-150220-expected.tx: Added. 13 * js/regress-150220.html: Added. 14 * js/script-tests/regress-150220.js: Added. 15 (Obj): 16 (SubObj): 17 1 18 2015-10-16 Hunseop Jeong <hs85.jeong@samsung.com> 2 19 -
trunk/LayoutTests/js/caller-property-expected.txt
r190695 r191175 11 11 PASS strictCaller(nonStrictCallee) threw exception TypeError: Function.caller used to retrieve strict caller. 12 12 PASS strictCaller(strictCallee) threw exception TypeError: Type error. 13 FAIL strictTailCaller(nonStrictCallee) should be null. Threw exception TypeError: Function.caller used to retrieve strict caller 13 PASS strictTailCaller(nonStrictCallee) is null 14 14 PASS strictTailCaller(strictCallee) threw exception TypeError: Type error. 15 15 PASS nonStrictCaller(boundNonStrictCallee) is nonStrictCaller … … 17 17 PASS strictCaller(boundNonStrictCallee) threw exception TypeError: Function.caller used to retrieve strict caller. 18 18 PASS strictCaller(boundStrictCallee) threw exception TypeError: Type error. 19 FAIL strictTailCaller(boundNonStrictCallee) should be null. Threw exception TypeError: Function.caller used to retrieve strict caller 19 PASS strictTailCaller(boundNonStrictCallee) is null 20 20 PASS strictTailCaller(boundStrictCallee) threw exception TypeError: Type error. 21 21 PASS nonStrictGetter(nonStrictAccessor) is nonStrictGetter -
trunk/Source/JavaScriptCore/ChangeLog
r191165 r191175 1 2015-10-15 Michael Saboff <msaboff@apple.com> 2 3 REGRESSION (r190289): Repro crash clicking back button on netflix.com 4 https://bugs.webkit.org/show_bug.cgi?id=150220 5 6 Reviewed by Geoffrey Garen. 7 8 Since constructors check for a valid new "this" object and return it, we can't make 9 a tail call to another function from within a constructor. 10 11 Re-enabled the tail calls and the related tail call tests. 12 13 Did some other miscellaneous clean up in the tail call code as part of the debugging. 14 15 * bytecompiler/BytecodeGenerator.cpp: 16 (JSC::BytecodeGenerator::BytecodeGenerator): 17 * ftl/FTLLowerDFGToLLVM.cpp: 18 (JSC::FTL::DFG::LowerDFGToLLVM::callPreflight): 19 * interpreter/Interpreter.h: 20 (JSC::calleeFrameForVarargs): 21 * runtime/Options.h: 22 * tests/es6.yaml: 23 * tests/stress/dfg-tail-calls.js: 24 (nonInlinedTailCall.callee): 25 * tests/stress/mutual-tail-call-no-stack-overflow.js: 26 (shouldThrow): 27 * tests/stress/tail-call-in-inline-cache.js: 28 (tail): 29 * tests/stress/tail-call-no-stack-overflow.js: 30 (shouldThrow): 31 * tests/stress/tail-call-recognize.js: 32 (callerMustBeRun): 33 * tests/stress/tail-call-varargs-no-stack-overflow.js: 34 (shouldThrow): 35 1 36 2015-10-15 Joseph Pecoraro <pecoraro@apple.com> 2 37 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r191058 r191175 199 199 // compatible with tail calls (we have no way of emitting op_did_call). 200 200 // https://bugs.webkit.org/show_bug.cgi?id=148819 201 , m_inTailPosition(Options::useTailCalls() && constructorKind() == ConstructorKind::None && isStrictMode() && !m_shouldEmitProfileHooks)201 , m_inTailPosition(Options::useTailCalls() && !isConstructor() && constructorKind() == ConstructorKind::None && isStrictMode() && !m_shouldEmitProfileHooks) 202 202 { 203 203 for (auto& constantRegister : m_linkTimeConstantRegisters) -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
r191058 r191175 8617 8617 || m_node->op() == TailCallVarargsInlinedCaller 8618 8618 || m_node->op() == TailCallForwardVarargsInlinedCaller) 8619 codeOrigin = *codeOrigin.inlineCallFrame->getCallerSkippingDeadFrames();8619 codeOrigin = *codeOrigin.inlineCallFrame->getCallerSkippingDeadFrames(); 8620 8620 8621 8621 callPreflight(codeOrigin); -
trunk/Source/JavaScriptCore/interpreter/Interpreter.h
r189920 r191175 279 279 inline CallFrame* calleeFrameForVarargs(CallFrame* callFrame, unsigned numUsedStackSlots, unsigned argumentCountIncludingThis) 280 280 { 281 #if 1282 281 // We want the new frame to be allocated on a stack aligned offset with a stack 283 282 // aligned size. Align the size here. … … 287 286 288 287 // Align the frame offset here. 289 #endif290 288 unsigned paddedCalleeFrameOffset = WTF::roundUpToMultipleOf( 291 289 stackAlignmentRegisters(), -
trunk/Source/JavaScriptCore/runtime/Options.h
r191058 r191175 132 132 \ 133 133 v(bool, useFunctionDotArguments, true, nullptr) \ 134 v(bool, useTailCalls, false, nullptr) \134 v(bool, useTailCalls, true, nullptr) \ 135 135 \ 136 136 /* dumpDisassembly implies dumpDFGDisassembly. */ \ -
trunk/Source/JavaScriptCore/tests/es6.yaml
r191110 r191175 878 878 cmd: runES6 :fail 879 879 - path: es6/proper_tail_calls_tail_call_optimisation_direct_recursion.js 880 cmd: runES6 : fail880 cmd: runES6 :normal 881 881 - path: es6/proper_tail_calls_tail_call_optimisation_mutual_recursion.js 882 cmd: runES6 : fail882 cmd: runES6 :normal 883 883 - path: es6/prototype_of_bound_functions_arrow_functions.js 884 884 cmd: runES6 :fail -
trunk/Source/JavaScriptCore/tests/stress/dfg-tail-calls.js
r190699 r191175 1 //@ skip2 1 (function nonInlinedTailCall() { 3 2 function callee() { if (callee.caller != nonInlinedTailCall) throw new Error(); } -
trunk/Source/JavaScriptCore/tests/stress/mutual-tail-call-no-stack-overflow.js
r190699 r191175 1 //@ skip2 1 function shouldThrow(func, errorMessage) { 3 2 var errorThrown = false; -
trunk/Source/JavaScriptCore/tests/stress/tail-call-in-inline-cache.js
r190699 r191175 1 //@ skip2 1 "use strict"; 3 2 -
trunk/Source/JavaScriptCore/tests/stress/tail-call-no-stack-overflow.js
r190699 r191175 1 //@ skip2 1 function shouldThrow(func, errorMessage) { 3 2 var errorThrown = false; -
trunk/Source/JavaScriptCore/tests/stress/tail-call-recognize.js
r190699 r191175 1 //@ skip2 1 function callerMustBeRun() { 3 2 if (!Object.is(callerMustBeRun.caller, runTests)) -
trunk/Source/JavaScriptCore/tests/stress/tail-call-varargs-no-stack-overflow.js
r190699 r191175 1 //@ skip2 1 function shouldThrow(func, errorMessage) { 3 2 var errorThrown = false;
Note: See TracChangeset
for help on using the changeset viewer.