Revision: 22271
Author:   [email protected]
Date:     Tue Jul  8 08:46:33 2014 UTC
Log: Use hydrogenized KeyedLoadGeneric stub for generic named loads too (with --compiled-keyed-generic-loads).

[email protected]

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

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

=======================================
--- /branches/bleeding_edge/src/ic.cc   Tue Jul  8 08:43:20 2014 UTC
+++ /branches/bleeding_edge/src/ic.cc   Tue Jul  8 08:46:33 2014 UTC
@@ -607,9 +607,11 @@
       } else if (state() == PREMONOMORPHIC) {
         FunctionPrototypeStub function_prototype_stub(isolate(), kind());
         stub = function_prototype_stub.GetCode();
-      } else if (state() != MEGAMORPHIC) {
+ } else if (!FLAG_compiled_keyed_generic_loads && state() != MEGAMORPHIC) {
         ASSERT(state() != GENERIC);
         stub = megamorphic_stub();
+      } else if (FLAG_compiled_keyed_generic_loads && state() != GENERIC) {
+        stub = generic_stub();
       }
       if (!stub.is_null()) {
         set_target(*stub);
@@ -834,6 +836,10 @@
         if (UpdatePolymorphicIC(type, name, code)) break;
         CopyICToMegamorphicCache(name);
       }
+      if (FLAG_compiled_keyed_generic_loads && (kind() == Code::LOAD_IC)) {
+        set_target(*generic_stub());
+        break;
+      }
       set_target(*megamorphic_stub());
       // Fall through.
     case MEGAMORPHIC:
@@ -863,6 +869,11 @@
 Handle<Code> LoadIC::megamorphic_stub() {
return isolate()->stub_cache()->ComputeLoad(MEGAMORPHIC, extra_ic_state());
 }
+
+
+Handle<Code> LoadIC::generic_stub() const {
+  return KeyedLoadGenericElementStub(isolate()).GetCode();
+}


 Handle<Code> LoadIC::SimpleFieldLoad(FieldIndex index) {
=======================================
--- /branches/bleeding_edge/src/ic.h    Tue Jul  8 08:28:08 2014 UTC
+++ /branches/bleeding_edge/src/ic.h    Tue Jul  8 08:46:33 2014 UTC
@@ -464,6 +464,7 @@
   }

   virtual Handle<Code> megamorphic_stub();
+  virtual Handle<Code> generic_stub() const;

   // Update the inline cache and the global stub cache based on the
   // lookup result.

--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to