diff options
Diffstat (limited to 'deps/v8/test/mjsunit/elements-transition-hoisting.js')
-rw-r--r-- | deps/v8/test/mjsunit/elements-transition-hoisting.js | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/deps/v8/test/mjsunit/elements-transition-hoisting.js b/deps/v8/test/mjsunit/elements-transition-hoisting.js index 5fb3889c6e..017e7ec51f 100644 --- a/deps/v8/test/mjsunit/elements-transition-hoisting.js +++ b/deps/v8/test/mjsunit/elements-transition-hoisting.js @@ -25,8 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Flags: --allow-natives-syntax --smi-only-arrays --expose-gc -// Flags: --noparallel-recompilation +// Flags: --allow-natives-syntax --smi-only-arrays --noparallel-recompilation // Ensure that ElementsKind transitions in various situations are hoisted (or // not hoisted) correctly, don't change the semantics programs and don't trigger @@ -40,11 +39,6 @@ if (support_smi_only_arrays) { print("Tests do NOT include smi-only arrays."); } -// Force existing ICs from previous stress runs to be flushed, otherwise the -// assumptions in this test about when deoptimizations get triggered are not -// valid. -gc(); - if (support_smi_only_arrays) { // Make sure that a simple elements array transitions inside a loop before // stores to an array gets hoisted in a way that doesn't generate a deopt in @@ -66,6 +60,7 @@ if (support_smi_only_arrays) { testDoubleConversion4(new Array(5)); testDoubleConversion4(new Array(5)); assertTrue(2 != %GetOptimizationStatus(testDoubleConversion4)); + %ClearFunctionTypeFeedback(testDoubleConversion4); // Make sure that non-element related map checks that are not preceded by // transitions in a loop still get hoisted in a way that doesn't generate a @@ -91,6 +86,7 @@ if (support_smi_only_arrays) { testExactMapHoisting(new Array(5)); testExactMapHoisting(new Array(5)); assertTrue(2 != %GetOptimizationStatus(testExactMapHoisting)); + %ClearFunctionTypeFeedback(testExactMapHoisting); // Make sure that non-element related map checks do NOT get hoisted if they // depend on an elements transition before them and it's not possible to hoist @@ -122,6 +118,7 @@ if (support_smi_only_arrays) { testExactMapHoisting2(new Array(5)); // Temporarily disabled - see bug 2176. // assertTrue(2 != %GetOptimizationStatus(testExactMapHoisting2)); + %ClearFunctionTypeFeedback(testExactMapHoisting2); // Make sure that non-element related map checks do get hoisted if they use // the transitioned map for the check and all transitions that they depend @@ -150,6 +147,7 @@ if (support_smi_only_arrays) { testExactMapHoisting3(new Array(5)); testExactMapHoisting3(new Array(5)); assertTrue(2 != %GetOptimizationStatus(testExactMapHoisting3)); + %ClearFunctionTypeFeedback(testExactMapHoisting3); function testDominatingTransitionHoisting1(a) { var object = new Object(); @@ -163,6 +161,7 @@ if (support_smi_only_arrays) { } while (--count > 3); } + /* testDominatingTransitionHoisting1(new Array(5)); testDominatingTransitionHoisting1(new Array(5)); // Call twice to make sure // that second store is a @@ -171,7 +170,12 @@ if (support_smi_only_arrays) { %OptimizeFunctionOnNextCall(testDominatingTransitionHoisting1); testDominatingTransitionHoisting1(new Array(5)); testDominatingTransitionHoisting1(new Array(5)); + // TODO(verwaest) With current changes the elements transition gets hoisted + // above the access, causing a deopt. We should update the type of access + // rather than forbid hoisting the transition. assertTrue(2 != %GetOptimizationStatus(testDominatingTransitionHoisting1)); + %ClearFunctionTypeFeedback(testDominatingTransitionHoisting1); + */ function testHoistingWithSideEffect(a) { var object = new Object(); @@ -191,6 +195,7 @@ if (support_smi_only_arrays) { testHoistingWithSideEffect(new Array(5)); testHoistingWithSideEffect(new Array(5)); assertTrue(2 != %GetOptimizationStatus(testHoistingWithSideEffect)); + %ClearFunctionTypeFeedback(testHoistingWithSideEffect); function testStraightLineDupeElinination(a,b,c,d,e,f) { var count = 3; @@ -226,7 +231,8 @@ if (support_smi_only_arrays) { testStraightLineDupeElinination(new Array(5),0,0,0,.5,0); testStraightLineDupeElinination(new Array(5),0,0,0,0,.5); %OptimizeFunctionOnNextCall(testStraightLineDupeElinination); - testStraightLineDupeElinination(new Array(5)); - testStraightLineDupeElinination(new Array(5)); + testStraightLineDupeElinination(new Array(5),0,0,0,0,0); + testStraightLineDupeElinination(new Array(5),0,0,0,0,0); assertTrue(2 != %GetOptimizationStatus(testStraightLineDupeElinination)); + %ClearFunctionTypeFeedback(testStraightLineDupeElinination); } |