Remove duplicate way of encoding the holder in the flags.
authorverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 Sep 2013 11:22:23 +0000 (11:22 +0000)
committerverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 Sep 2013 11:22:23 +0000 (11:22 +0000)
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/24316002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/objects.h
src/stub-cache.cc

index 1b69047..d478a3f 100644 (file)
@@ -4813,11 +4813,6 @@ class Code: public HeapObject {
     NONEXISTENT
   };
 
-  enum StubHolder {
-    OWN_STUB,
-    PROTOTYPE_STUB
-  };
-
   typedef int ExtraICState;
 
   static const ExtraICState kNoExtraICState = 0;
@@ -5022,8 +5017,6 @@ class Code: public HeapObject {
   class ExtraICStateKeyedAccessStoreMode:
       public BitField<KeyedAccessStoreMode, 1, 4> {};  // NOLINT
 
-  class ExtraICStateStubHolder: public BitField<StubHolder, 0, 1> {};
-
   static inline StrictModeFlag GetStrictMode(ExtraICState extra_ic_state) {
     return ExtraICStateStrictMode::decode(extra_ic_state);
   }
@@ -5040,10 +5033,6 @@ class Code: public HeapObject {
         ExtraICStateStrictMode::encode(strict_mode);
   }
 
-  static inline ExtraICState ComputeExtraICState(StubHolder stub_holder) {
-    return ExtraICStateStubHolder::encode(stub_holder);
-  }
-
   // Flags operations.
   static inline Flags ComputeFlags(
       Kind kind,
index f136083..0318a39 100644 (file)
@@ -136,12 +136,11 @@ Handle<Code> StubCache::FindLoadHandler(Handle<Name> name,
                                         Handle<JSObject> stub_holder,
                                         Code::Kind kind,
                                         Code::StubType type) {
-  Code::ExtraICState extra_ic_state = Code::ComputeExtraICState(
-      receiver.is_identical_to(stub_holder) ? Code::OWN_STUB
-                                            : Code::PROTOTYPE_STUB);
+  InlineCacheHolderFlag holder_flag = receiver.is_identical_to(stub_holder)
+      ? OWN_MAP : PROTOTYPE_MAP;
   ASSERT(type != Code::NORMAL);
   Code::Flags flags = Code::ComputeMonomorphicFlags(
-      Code::STUB, extra_ic_state, type, kind);
+      Code::STUB, Code::kNoExtraICState, type, kind, holder_flag);
   Handle<Object> probe(stub_holder->map()->FindInCodeCache(*name, flags),
                        isolate_);
   if (probe->IsCode()) return Handle<Code>::cast(probe);