Revision: 18385
Author:   mvstan...@chromium.org
Date:     Fri Dec 20 11:46:31 2013 UTC
Log:      Remove flag track-allocation-sites.

The flag has been on in the build for ~9 months, and we aren't likely to turn it off. The only customer of the flag is a set of tests that want to verify transitioning behavior in isolation. This CL removes the flag and updates those tests to get what they want without the flag.

R=verwa...@chromium.org

Review URL: https://codereview.chromium.org/104923010
http://code.google.com/p/v8/source/detail?r=18385

Modified:
 /branches/bleeding_edge/src/code-stubs.h
 /branches/bleeding_edge/src/flag-definitions.h
 /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc
 /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc
 /branches/bleeding_edge/src/objects-inl.h
 /branches/bleeding_edge/src/objects.cc
 /branches/bleeding_edge/test/mjsunit/allocation-site-info.js
 /branches/bleeding_edge/test/mjsunit/array-constructor-feedback.js
 /branches/bleeding_edge/test/mjsunit/array-feedback.js
 /branches/bleeding_edge/test/mjsunit/array-literal-feedback.js
 /branches/bleeding_edge/test/mjsunit/array-natives-elements.js
 /branches/bleeding_edge/test/mjsunit/elements-kind.js
 /branches/bleeding_edge/test/mjsunit/elements-transition-and-store.js
 /branches/bleeding_edge/test/mjsunit/elements-transition-hoisting.js
 /branches/bleeding_edge/test/mjsunit/elements-transition.js
 /branches/bleeding_edge/test/mjsunit/opt-elements-kind.js
 /branches/bleeding_edge/test/mjsunit/osr-elements-kind.js
 /branches/bleeding_edge/test/mjsunit/regress/regress-320532.js
 /branches/bleeding_edge/test/mjsunit/regress/regress-convert-hole2.js
 /branches/bleeding_edge/test/mjsunit/regress/regress-crbug-244461.js
 /branches/bleeding_edge/test/mjsunit/regress/regress-crbug-245480.js
 /branches/bleeding_edge/test/mjsunit/transition-elements-kind.js

=======================================
--- /branches/bleeding_edge/src/code-stubs.h    Wed Dec 18 22:51:23 2013 UTC
+++ /branches/bleeding_edge/src/code-stubs.h    Fri Dec 20 11:46:31 2013 UTC
@@ -1907,8 +1907,7 @@
     // It only makes sense to override local allocation site behavior
     // if there is a difference between the global allocation site policy
     // for an ElementsKind and the desired usage of the stub.
-    ASSERT(!(FLAG_track_allocation_sites &&
-             override_mode == DISABLE_ALLOCATION_SITES) ||
+    ASSERT(override_mode != DISABLE_ALLOCATION_SITES ||
            AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE);
     bit_field_ = ElementsKindBits::encode(kind) |
         AllocationSiteOverrideModeBits::encode(override_mode) |
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Thu Dec 19 16:04:08 2013 UTC +++ /branches/bleeding_edge/src/flag-definitions.h Fri Dec 20 11:46:31 2013 UTC
@@ -309,8 +309,6 @@
 DEFINE_bool(fold_constants, true, "use constant folding")
DEFINE_bool(trace_dead_code_elimination, false, "trace dead code elimination") DEFINE_bool(unreachable_code_elimination, true, "eliminate unreachable code")
-DEFINE_bool(track_allocation_sites, true,
-            "Use allocation site info to reduce transitions")
 DEFINE_bool(trace_osr, false, "trace on-stack replacement")
 DEFINE_int(stress_runs, 0, "number of stress runs")
 DEFINE_bool(optimize_closures, true, "optimize closures")
=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Wed Dec 18 10:40:26 2013 UTC +++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Fri Dec 20 11:46:31 2013 UTC
@@ -5457,18 +5457,13 @@

 template<class T>
 static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) {
-  ElementsKind initial_kind = GetInitialFastElementsKind();
-  ElementsKind initial_holey_kind = GetHoleyElementsKind(initial_kind);
-
   int to_index = GetSequenceIndexFromFastElementsKind(
       TERMINAL_FAST_ELEMENTS_KIND);
   for (int i = 0; i <= to_index; ++i) {
     ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
     T stub(kind);
     stub.GetCode(isolate);
-    if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE ||
-        (!FLAG_track_allocation_sites &&
-         (kind == initial_kind || kind == initial_holey_kind))) {
+    if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE) {
       T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES);
       stub1.GetCode(isolate);
     }
=======================================
--- /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Wed Dec 18 11:44:38 2013 UTC +++ /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Fri Dec 20 11:46:31 2013 UTC
@@ -1716,8 +1716,7 @@
   Handle<FixedArrayBase> constant_elements_values(
       FixedArrayBase::cast(constant_elements->get(1)));

-  AllocationSiteMode allocation_site_mode = FLAG_track_allocation_sites
-      ? TRACK_ALLOCATION_SITE : DONT_TRACK_ALLOCATION_SITE;
+  AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE;
   if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) {
     // If the only customer of allocation sites is transitioning, then
     // we can turn it off if we don't have anywhere else to transition to.
=======================================
--- /branches/bleeding_edge/src/objects-inl.h   Wed Dec 18 21:23:56 2013 UTC
+++ /branches/bleeding_edge/src/objects-inl.h   Fri Dec 20 11:46:31 2013 UTC
@@ -1326,8 +1326,7 @@
 // elements kind is the initial elements kind.
 AllocationSiteMode AllocationSite::GetMode(
     ElementsKind boilerplate_elements_kind) {
-  if (FLAG_track_allocation_sites &&
-      IsFastSmiElementsKind(boilerplate_elements_kind)) {
+  if (IsFastSmiElementsKind(boilerplate_elements_kind)) {
     return TRACK_ALLOCATION_SITE;
   }

@@ -1337,8 +1336,7 @@

 AllocationSiteMode AllocationSite::GetMode(ElementsKind from,
                                            ElementsKind to) {
-  if (FLAG_track_allocation_sites &&
-      IsFastSmiElementsKind(from) &&
+  if (IsFastSmiElementsKind(from) &&
       IsMoreGeneralElementsKindTransition(from, to)) {
     return TRACK_ALLOCATION_SITE;
   }
=======================================
--- /branches/bleeding_edge/src/objects.cc      Wed Dec 18 20:08:54 2013 UTC
+++ /branches/bleeding_edge/src/objects.cc      Fri Dec 20 11:46:31 2013 UTC
@@ -9191,26 +9191,24 @@
// checking the object immediately after the current object (if there is one)
   // to see if it's an AllocationMemento.
   ASSERT(object->GetHeap()->InNewSpace(object));
-  if (FLAG_track_allocation_sites) {
- Address ptr_end = (reinterpret_cast<Address>(object) - kHeapObjectTag) +
-        object->Size();
-    Address top;
-    if (in_GC) {
-      top = object->GetHeap()->new_space()->FromSpacePageHigh();
-    } else {
-      top = object->GetHeap()->NewSpaceTop();
-    }
-    if ((ptr_end + AllocationMemento::kSize) <= top) {
-      // There is room in newspace for allocation info. Do we have some?
-      Map** possible_allocation_memento_map =
-          reinterpret_cast<Map**>(ptr_end);
-      if (*possible_allocation_memento_map ==
-          object->GetHeap()->allocation_memento_map()) {
-        AllocationMemento* memento = AllocationMemento::cast(
-            reinterpret_cast<Object*>(ptr_end + kHeapObjectTag));
-        if (memento->IsValid()) {
-          return memento;
-        }
+  Address ptr_end = (reinterpret_cast<Address>(object) - kHeapObjectTag) +
+      object->Size();
+  Address top;
+  if (in_GC) {
+    top = object->GetHeap()->new_space()->FromSpacePageHigh();
+  } else {
+    top = object->GetHeap()->NewSpaceTop();
+  }
+  if ((ptr_end + AllocationMemento::kSize) <= top) {
+    // There is room in newspace for allocation info. Do we have some?
+    Map** possible_allocation_memento_map =
+        reinterpret_cast<Map**>(ptr_end);
+    if (*possible_allocation_memento_map ==
+        object->GetHeap()->allocation_memento_map()) {
+      AllocationMemento* memento = AllocationMemento::cast(
+          reinterpret_cast<Object*>(ptr_end + kHeapObjectTag));
+      if (memento->IsValid()) {
+        return memento;
       }
     }
   }
@@ -12895,7 +12893,7 @@


 MaybeObject* JSObject::UpdateAllocationSite(ElementsKind to_kind) {
-  if (!FLAG_track_allocation_sites || !IsJSArray()) {
+  if (!IsJSArray()) {
     return this;
   }

=======================================
--- /branches/bleeding_edge/test/mjsunit/allocation-site-info.js Wed Nov 6 15:45:43 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/allocation-site-info.js Fri Dec 20 11:46:31 2013 UTC
@@ -26,7 +26,7 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 // Flags: --allow-natives-syntax --smi-only-arrays --expose-gc
-// Flags: --track-allocation-sites --noalways-opt
+// Flags: --noalways-opt

 // Test element kind of objects.
 // Since --smi-only-arrays affects builtins, its default setting at compile
=======================================
--- /branches/bleeding_edge/test/mjsunit/array-constructor-feedback.js Thu Nov 14 12:05:09 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/array-constructor-feedback.js Fri Dec 20 11:46:31 2013 UTC
@@ -26,7 +26,7 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 // Flags: --allow-natives-syntax --smi-only-arrays --expose-gc
-// Flags: --track-allocation-sites --noalways-opt
+// Flags: --noalways-opt

 // Test element kind of objects.
 // Since --smi-only-arrays affects builtins, its default setting at compile
=======================================
--- /branches/bleeding_edge/test/mjsunit/array-feedback.js Mon Jul 22 09:16:33 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/array-feedback.js Fri Dec 20 11:46:31 2013 UTC
@@ -26,7 +26,7 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 // Flags: --allow-natives-syntax --smi-only-arrays --expose-gc
-// Flags: --track-allocation-sites --noalways-opt
+// Flags: --noalways-opt

 // Test element kind of objects.
 // Since --smi-only-arrays affects builtins, its default setting at compile
=======================================
--- /branches/bleeding_edge/test/mjsunit/array-literal-feedback.js Mon Nov 25 12:41:27 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/array-literal-feedback.js Fri Dec 20 11:46:31 2013 UTC
@@ -26,7 +26,7 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 // Flags: --allow-natives-syntax --smi-only-arrays --expose-gc
-// Flags: --track-allocation-sites --noalways-opt
+// Flags: --noalways-opt

 // Test element kind of objects.
 // Since --smi-only-arrays affects builtins, its default setting at compile
=======================================
--- /branches/bleeding_edge/test/mjsunit/array-natives-elements.js Mon Jul 22 09:16:33 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/array-natives-elements.js Fri Dec 20 11:46:31 2013 UTC
@@ -26,7 +26,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 // Flags: --allow-natives-syntax --smi-only-arrays
-// Flags: --notrack-allocation-sites

 // Test element kind of objects.
// Since --smi-only-arrays affects builtins, its default setting at compile time
=======================================
--- /branches/bleeding_edge/test/mjsunit/elements-kind.js Fri Jul 19 08:25:44 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/elements-kind.js Fri Dec 20 11:46:31 2013 UTC
@@ -26,12 +26,7 @@
 // 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
-// end up going generic.
-// Flags: --stress-runs=2
+// Flags: --nostress-opt

 // Test element kind of objects.
 // Since --smi-only-arrays affects builtins, its default setting at compile
@@ -123,56 +118,75 @@
 }

// Make sure the element kind transitions from smi when a non-smi is stored.
-var you = new Array();
-assertKind(elements_kind.fast_smi_only, you);
-for (var i = 0; i < 1337; i++) {
-  var val = i;
-  if (i == 1336) {
-    assertKind(elements_kind.fast_smi_only, you);
-    val = new Object();
+function test_wrapper() {
+  var you = new Array();
+  assertKind(elements_kind.fast_smi_only, you);
+  for (var i = 0; i < 1337; i++) {
+    var val = i;
+    if (i == 1336) {
+      assertKind(elements_kind.fast_smi_only, you);
+      val = new Object();
+    }
+    you[i] = val;
   }
-  you[i] = val;
-}
-assertKind(elements_kind.fast, you);
+  assertKind(elements_kind.fast, you);

-assertKind(elements_kind.dictionary, new Array(0xDECAF));
+  assertKind(elements_kind.dictionary, new Array(0xDECAF));

-var fast_double_array = new Array(0xDECAF);
-for (var i = 0; i < 0xDECAF; i++) fast_double_array[i] = i / 2;
-assertKind(elements_kind.fast_double, fast_double_array);
+  var fast_double_array = new Array(0xDECAF);
+  for (var i = 0; i < 0xDECAF; i++) fast_double_array[i] = i / 2;
+  assertKind(elements_kind.fast_double, fast_double_array);

-assertKind(elements_kind.external_byte,           new Int8Array(9001));
-assertKind(elements_kind.external_unsigned_byte,  new Uint8Array(007));
-assertKind(elements_kind.external_short,          new Int16Array(666));
-assertKind(elements_kind.external_unsigned_short, new Uint16Array(42));
-assertKind(elements_kind.external_int,            new Int32Array(0xF));
-assertKind(elements_kind.external_unsigned_int,   new Uint32Array(23));
-assertKind(elements_kind.external_float,          new Float32Array(7));
-assertKind(elements_kind.external_double,         new Float64Array(0));
-assertKind(elements_kind.external_pixel, new Uint8ClampedArray(512));
+  assertKind(elements_kind.external_byte,           new Int8Array(9001));
+  assertKind(elements_kind.external_unsigned_byte,  new Uint8Array(007));
+  assertKind(elements_kind.external_short,          new Int16Array(666));
+  assertKind(elements_kind.external_unsigned_short, new Uint16Array(42));
+  assertKind(elements_kind.external_int,            new Int32Array(0xF));
+  assertKind(elements_kind.external_unsigned_int,   new Uint32Array(23));
+  assertKind(elements_kind.external_float,          new Float32Array(7));
+  assertKind(elements_kind.external_double,         new Float64Array(0));
+ assertKind(elements_kind.external_pixel, new Uint8ClampedArray(512));

-// Crankshaft support for smi-only array elements.
-function monomorphic(array) {
-  assertKind(elements_kind.fast_smi_only, array);
-  for (var i = 0; i < 3; i++) {
-    array[i] = i + 10;
-  }
-  assertKind(elements_kind.fast_smi_only, array);
-  for (var i = 0; i < 3; i++) {
-    var a = array[i];
-    assertEquals(i + 10, a);
+  // Crankshaft support for smi-only array elements.
+  function monomorphic(array) {
+    assertKind(elements_kind.fast_smi_only, array);
+    for (var i = 0; i < 3; i++) {
+      array[i] = i + 10;
+    }
+    assertKind(elements_kind.fast_smi_only, array);
+    for (var i = 0; i < 3; i++) {
+      var a = array[i];
+      assertEquals(i + 10, a);
+    }
   }
+  var smi_only = new Array(1, 2, 3);
+  assertKind(elements_kind.fast_smi_only, smi_only);
+  for (var i = 0; i < 3; i++) monomorphic(smi_only);
+    %OptimizeFunctionOnNextCall(monomorphic);
+  monomorphic(smi_only);
 }
-var smi_only = new Array(1, 2, 3);
-assertKind(elements_kind.fast_smi_only, smi_only);
-for (var i = 0; i < 3; i++) monomorphic(smi_only);
-%OptimizeFunctionOnNextCall(monomorphic);
-monomorphic(smi_only);
+
+// The test is called in a wrapper function to eliminate the transition learning
+// feedback of AllocationSites.
+test_wrapper();
+%ClearFunctionTypeFeedback(test_wrapper);

 if (support_smi_only_arrays) {
   %NeverOptimizeFunction(construct_smis);
+
+ // 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;
=======================================
--- /branches/bleeding_edge/test/mjsunit/elements-transition-and-store.js Mon Jul 29 09:12:16 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/elements-transition-and-store.js Fri Dec 20 11:46:31 2013 UTC
@@ -25,8 +25,6 @@
 // (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: --notrack-allocation-sites
-
 function foo(a, v) {
   a[0] = v;
   return a;
=======================================
--- /branches/bleeding_edge/test/mjsunit/elements-transition-hoisting.js Mon Jul 22 09:16:33 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/elements-transition-hoisting.js Fri Dec 20 11:46:31 2013 UTC
@@ -25,10 +25,8 @@
 // (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 --notrack-allocation-sites
-
-// No tracking of allocation sites because it interfers with the semantics
-// the test is trying to ensure.
+// Flags: --allow-natives-syntax --smi-only-arrays
+// Flags: --nostress-opt

// Ensure that ElementsKind transitions in various situations are hoisted (or // not hoisted) correctly, don't change the semantics programs and don't trigger
@@ -42,7 +40,7 @@
   print("Tests do NOT include smi-only arrays.");
 }

-if (support_smi_only_arrays) {
+function test_wrapper() {
// 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
   // simple cases.}
@@ -239,3 +237,10 @@
   assertOptimized(testStraightLineDupeElinination);
   %ClearFunctionTypeFeedback(testStraightLineDupeElinination);
 }
+
+if (support_smi_only_arrays) {
+  // The test is called in a test wrapper that has type feedback cleared to
+ // prevent the influence of allocation-sites, which learn from transitions.
+  test_wrapper();
+  %ClearFunctionTypeFeedback(test_wrapper);
+}
=======================================
--- /branches/bleeding_edge/test/mjsunit/elements-transition.js Fri Mar 1 16:06:34 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/elements-transition.js Fri Dec 20 11:46:31 2013 UTC
@@ -25,7 +25,8 @@
 // (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 --notrack-allocation-sites
+// Flags: --allow-natives-syntax --smi-only-arrays
+// Flags: --nostress-opt

 support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8));

@@ -36,14 +37,26 @@
 }

 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(length) {
+    this.__sequence = this.__sequence + 1;
+    return "/* " + this.__sequence + " */  new Array(" + length + ");";
+  }
+  function make_array(length) {
+    return eval(make_array_string(length));
+  }
+
   function test(test_double, test_object, set, length) {
// We apply the same operations to two identical arrays. The first array // triggers an IC miss, upon which the conversion stub is generated, but the
     // actual conversion is done in runtime.  The second array, arriving at
// the previously patched IC, is then converted using the conversion stub.
-    var array_1 = new Array(length);
-    var array_2 = new Array(length);
+    var array_1 = make_array(length);
+    var array_2 = make_array(length);

+    // false, true, nice setter function, 20
     assertTrue(%HasFastSmiElements(array_1));
     assertTrue(%HasFastSmiElements(array_2));
     for (var i = 0; i < length; i++) {
@@ -86,15 +99,20 @@
     assertEquals(length, array_2.length);
   }

-  test(false, false, function(a,i,v){ a[i] = v; }, 20);
-  test(true,  false, function(a,i,v){ a[i] = v; }, 20);
-  test(false, true,  function(a,i,v){ a[i] = v; }, 20);
-  test(true,  true,  function(a,i,v){ a[i] = v; }, 20);
+  function run_test(test_double, test_object, set, length) {
+    test(test_double, test_object, set, length);
+    %ClearFunctionTypeFeedback(test);
+  }
+
+  run_test(false, false, function(a,i,v){ a[i] = v; }, 20);
+  run_test(true,  false, function(a,i,v){ a[i] = v; }, 20);
+  run_test(false, true,  function(a,i,v){ a[i] = v; }, 20);
+  run_test(true,  true,  function(a,i,v){ a[i] = v; }, 20);

-  test(false, false, function(a,i,v){ a[i] = v; }, 10000);
-  test(true,  false, function(a,i,v){ a[i] = v; }, 10000);
-  test(false, true,  function(a,i,v){ a[i] = v; }, 10000);
-  test(true,  true,  function(a,i,v){ a[i] = v; }, 10000);
+  run_test(false, false, function(a,i,v){ a[i] = v; }, 10000);
+  run_test(true,  false, function(a,i,v){ a[i] = v; }, 10000);
+  run_test(false, true,  function(a,i,v){ a[i] = v; }, 10000);
+  run_test(true,  true,  function(a,i,v){ a[i] = v; }, 10000);

   // Check COW arrays
   function get_cow() { return [1, 2, 3]; }
=======================================
--- /branches/bleeding_edge/test/mjsunit/opt-elements-kind.js Tue Sep 24 11:35:57 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/opt-elements-kind.js Fri Dec 20 11:46:31 2013 UTC
@@ -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
@@ -114,8 +113,20 @@
 }

 %NeverOptimizeFunction(construct_smis);
+
+// 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;
=======================================
--- /branches/bleeding_edge/test/mjsunit/osr-elements-kind.js Fri Sep 20 07:26:11 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/osr-elements-kind.js Fri Dec 20 11:46:31 2013 UTC
@@ -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 @@
 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;
=======================================
--- /branches/bleeding_edge/test/mjsunit/regress/regress-320532.js Tue Nov 19 10:17:33 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/regress/regress-320532.js Fri Dec 20 11:46:31 2013 UTC
@@ -26,7 +26,7 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 // Flags: --allow-natives-syntax --smi-only-arrays --expose-gc
-// Flags: --track-allocation-sites --noalways-opt
+// Flags: --noalways-opt
 // Flags: --stress-runs=8 --send-idle-notification --gc-global


=======================================
--- /branches/bleeding_edge/test/mjsunit/regress/regress-convert-hole2.js Wed Aug 14 08:54:27 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/regress/regress-convert-hole2.js Fri Dec 20 11:46:31 2013 UTC
@@ -24,7 +24,7 @@
 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 // (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 --notrack-allocation-sites
+// Flags: --allow-natives-syntax

 // Test adding undefined from hole in double-holey to string.
 var a = [1.5, , 1.8];
=======================================
--- /branches/bleeding_edge/test/mjsunit/regress/regress-crbug-244461.js Mon Jun 3 14:46:23 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/regress/regress-crbug-244461.js Fri Dec 20 11:46:31 2013 UTC
@@ -26,7 +26,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 // Flags: --allow-natives-syntax --smi-only-arrays
-// Flags: --track-allocation-sites

 function foo(arg) {
   var a = arg();
=======================================
--- /branches/bleeding_edge/test/mjsunit/regress/regress-crbug-245480.js Fri Nov 22 13:50:39 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/regress/regress-crbug-245480.js Fri Dec 20 11:46:31 2013 UTC
@@ -26,7 +26,7 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 // Flags: --allow-natives-syntax --smi-only-arrays --expose-gc
-// Flags: --track-allocation-sites --noalways-opt
+// Flags: --noalways-opt

 // Test element kind of objects.
 // Since --smi-only-arrays affects builtins, its default setting at compile
=======================================
--- /branches/bleeding_edge/test/mjsunit/transition-elements-kind.js Mon Jul 29 09:12:16 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/transition-elements-kind.js Fri Dec 20 11:46:31 2013 UTC
@@ -25,7 +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 --track-allocation-sites
+// Flags: --allow-natives-syntax

 // Allocation site for empty double arrays.
 function foo() {

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to