Revision: 10659
Author:   [email protected]
Date:     Thu Feb  9 05:07:46 2012
Log: Revert 9111036: Promote double arrays to FAST_ELEMENT that use generic KeyedLoadIC

It tanked Kraken.

[email protected]

Review URL: https://chromiumcodereview.appspot.com/9368024
http://code.google.com/p/v8/source/detail?r=10659

Modified:
 /branches/bleeding_edge/src/ic.cc
 /branches/bleeding_edge/src/runtime.cc

=======================================
--- /branches/bleeding_edge/src/ic.cc   Thu Feb  9 02:19:46 2012
+++ /branches/bleeding_edge/src/ic.cc   Thu Feb  9 05:07:46 2012
@@ -1145,17 +1145,6 @@
} else if (key->IsSmi() && (target() != *non_strict_arguments_stub())) {
           stub = ComputeStub(receiver, LOAD, kNonStrictMode, stub);
         }
-        // If the IC is being replaced by the generic stub, loads from
-        // FAST_DOUBLE_ELEMENTS arrays will cause unboxing in Crankshafted
- // code. To prevent these expensive allocations, proactively promote
-        // arrays to FAST_ELEMENTS ElementKinds.
-        if (*stub == *generic_stub()) {
-          if (receiver->HasFastDoubleElements()) {
-            MaybeObject* maybe_object =
-                receiver->TransitionElementsKind(FAST_ELEMENTS);
-            if (maybe_object->IsFailure()) return maybe_object;
-          }
-        }
       }
     } else {
       TRACE_GENERIC_IC("KeyedLoadIC", "force generic");
=======================================
--- /branches/bleeding_edge/src/runtime.cc      Thu Feb  9 02:46:50 2012
+++ /branches/bleeding_edge/src/runtime.cc      Thu Feb  9 05:07:46 2012
@@ -4271,24 +4271,14 @@
           // If value is the hole do the general lookup.
         }
       }
-    } else if (args.at<Object>(1)->IsSmi()) {
- // Getting properties from FAST_DOUBLE_ELEMENTS arrays causes boxing. To - // proactively avoid excessive boxing, transition FAST_DOUBLE_ELEMENTS - // arrays to FAST_ELEMENTS if they are accessed via this function, which
-      // is called by the KeyedLoadIC::GenericStub.
-      Handle<JSObject> js_object(args.at<JSObject>(0));
-      if (js_object->HasFastDoubleElements()) {
-        MaybeObject* maybe_object =
-            js_object->TransitionElementsKind(FAST_ELEMENTS);
-        if (maybe_object->IsFailure()) return maybe_object;
-      }
-
+    } else if (FLAG_smi_only_arrays && args.at<Object>(1)->IsSmi()) {
       // JSObject without a string key. If the key is a Smi, check for a
// definite out-of-bounds access to elements, which is a strong indicator
       // that subsequent accesses will also call the runtime. Proactively
       // transition elements to FAST_ELEMENTS to avoid excessive boxing of
       // doubles for those future calls in the case that the elements would
       // become FAST_DOUBLE_ELEMENTS.
+      Handle<JSObject> js_object(args.at<JSObject>(0));
       ElementsKind elements_kind = js_object->GetElementsKind();
       if (elements_kind == FAST_SMI_ONLY_ELEMENTS ||
           elements_kind == FAST_DOUBLE_ELEMENTS) {

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to