Index: test/mjsunit/elements-transition-hoisting.js |
diff --git a/test/mjsunit/elements-transition-hoisting.js b/test/mjsunit/elements-transition-hoisting.js |
index 5fb3889c6e1b214755e68f0ec35ce34ed87e4af9..878beabf3911d36c9c4ab4569b015d6f1604cb78 100644 |
--- a/test/mjsunit/elements-transition-hoisting.js |
+++ b/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(); |
@@ -172,6 +170,7 @@ if (support_smi_only_arrays) { |
testDominatingTransitionHoisting1(new Array(5)); |
testDominatingTransitionHoisting1(new Array(5)); |
assertTrue(2 != %GetOptimizationStatus(testDominatingTransitionHoisting1)); |
+ %ClearFunctionTypeFeedback(testDominatingTransitionHoisting1); |
function testHoistingWithSideEffect(a) { |
var object = new Object(); |
@@ -191,8 +190,9 @@ 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) { |
+ function testStraightLineDupeElimination(a,b,c,d,e,f) { |
var count = 3; |
do { |
assertTrue(true); |
@@ -205,28 +205,29 @@ if (support_smi_only_arrays) { |
} while (--count > 3); |
} |
- testStraightLineDupeElinination(new Array(0, 0, 0, 0, 0),0,0,0,0,.5); |
- testStraightLineDupeElinination(new Array(0, 0, 0, 0, 0),0,0,0,.5,0); |
- testStraightLineDupeElinination(new Array(0, 0, 0, 0, 0),0,0,.5,0,0); |
- testStraightLineDupeElinination(new Array(0, 0, 0, 0, 0),0,.5,0,0,0); |
- testStraightLineDupeElinination(new Array(0, 0, 0, 0, 0),.5,0,0,0,0); |
- testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),0,0,0,0,.5); |
- testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),0,0,0,.5,0); |
- testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),0,0,.5,0,0); |
- testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),0,.5,0,0,0); |
- testStraightLineDupeElinination(new Array(.1,.1,.1,.1,.1),.5,0,0,0,0); |
- testStraightLineDupeElinination(new Array(5),.5,0,0,0,0); |
- testStraightLineDupeElinination(new Array(5),0,.5,0,0,0); |
- testStraightLineDupeElinination(new Array(5),0,0,.5,0,0); |
- testStraightLineDupeElinination(new Array(5),0,0,0,.5,0); |
- testStraightLineDupeElinination(new Array(5),0,0,0,0,.5); |
- testStraightLineDupeElinination(new Array(5),.5,0,0,0,0); |
- testStraightLineDupeElinination(new Array(5),0,.5,0,0,0); |
- testStraightLineDupeElinination(new Array(5),0,0,.5,0,0); |
- 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)); |
- assertTrue(2 != %GetOptimizationStatus(testStraightLineDupeElinination)); |
+ testStraightLineDupeElimination(new Array(0, 0, 0, 0, 0),0,0,0,0,.5); |
+ testStraightLineDupeElimination(new Array(0, 0, 0, 0, 0),0,0,0,.5,0); |
+ testStraightLineDupeElimination(new Array(0, 0, 0, 0, 0),0,0,.5,0,0); |
+ testStraightLineDupeElimination(new Array(0, 0, 0, 0, 0),0,.5,0,0,0); |
+ testStraightLineDupeElimination(new Array(0, 0, 0, 0, 0),.5,0,0,0,0); |
+ testStraightLineDupeElimination(new Array(.1,.1,.1,.1,.1),0,0,0,0,.5); |
+ testStraightLineDupeElimination(new Array(.1,.1,.1,.1,.1),0,0,0,.5,0); |
+ testStraightLineDupeElimination(new Array(.1,.1,.1,.1,.1),0,0,.5,0,0); |
+ testStraightLineDupeElimination(new Array(.1,.1,.1,.1,.1),0,.5,0,0,0); |
+ testStraightLineDupeElimination(new Array(.1,.1,.1,.1,.1),.5,0,0,0,0); |
+ testStraightLineDupeElimination(new Array(5),.5,0,0,0,0); |
+ testStraightLineDupeElimination(new Array(5),0,.5,0,0,0); |
+ testStraightLineDupeElimination(new Array(5),0,0,.5,0,0); |
+ testStraightLineDupeElimination(new Array(5),0,0,0,.5,0); |
+ testStraightLineDupeElimination(new Array(5),0,0,0,0,.5); |
+ testStraightLineDupeElimination(new Array(5),.5,0,0,0,0); |
+ testStraightLineDupeElimination(new Array(5),0,.5,0,0,0); |
+ testStraightLineDupeElimination(new Array(5),0,0,.5,0,0); |
+ testStraightLineDupeElimination(new Array(5),0,0,0,.5,0); |
+ testStraightLineDupeElimination(new Array(5),0,0,0,0,.5); |
+ %OptimizeFunctionOnNextCall(testStraightLineDupeElimination); |
+ testStraightLineDupeElimination(new Array(5)); |
+ testStraightLineDupeElimination(new Array(5)); |
+ assertTrue(2 != %GetOptimizationStatus(testStraightLineDupeElimination)); |
+ %ClearFunctionTypeFeedback(testStraightLineDupeElimination); |
} |