Index: test/mjsunit/osr-elements-kind.js |
diff --git a/test/mjsunit/osr-elements-kind.js b/test/mjsunit/osr-elements-kind.js |
index 8d4337732177a5e2afd5ee942cc3bb017e12715f..af4b5ec9f180d39b5b1823d02886da63acfcb053 100644 |
--- a/test/mjsunit/osr-elements-kind.js |
+++ b/test/mjsunit/osr-elements-kind.js |
@@ -26,7 +26,6 @@ |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
// Flags: --allow-natives-syntax --smi-only-arrays --expose-gc |
-// Flags: --notrack_allocation_sites |
// Limit the number of stress runs to reduce polymorphism it defeats some of the |
// assumptions made about how elements transitions work because transition stubs |
@@ -120,8 +119,19 @@ function assertKind(expected, obj, name_opt) { |
for (var i = 0; i < 1000000; i++) { } |
if (support_smi_only_arrays) { |
+ // This code exists to eliminate the learning influence of AllocationSites |
+ // on the following tests. |
+ var __sequence = 0; |
+ function make_array_string() { |
+ this.__sequence = this.__sequence + 1; |
+ return "/* " + this.__sequence + " */ [0, 0, 0];" |
+ } |
+ function make_array() { |
+ return eval(make_array_string()); |
+ } |
+ |
function construct_smis() { |
- var a = [0, 0, 0]; |
+ var a = make_array(); |
a[0] = 0; // Send the COW array map to the steak house. |
assertKind(elements_kind.fast_smi_only, a); |
return a; |