Remove dead code from LookupResult
authorverwaest@chromium.org <verwaest@chromium.org>
Tue, 26 Aug 2014 16:32:51 +0000 (16:32 +0000)
committerverwaest@chromium.org <verwaest@chromium.org>
Tue, 26 Aug 2014 16:32:51 +0000 (16:32 +0000)
BUG=
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/504183002

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

20 files changed:
BUILD.gn
src/bootstrapper.cc
src/code-stubs.cc
src/code-stubs.h
src/field-index.cc [deleted file]
src/field-index.h
src/heap-snapshot-generator.cc
src/hydrogen.cc
src/hydrogen.h
src/isolate.cc
src/lookup.cc
src/mirror-debugger.js
src/objects-printer.cc
src/objects.cc
src/property-details.h
src/property.cc
src/property.h
src/runtime.cc
test/cctest/test-debug.cc
tools/gyp/v8.gyp

index a93e31d8beb0d02871891e9eac1d23322e9cfb1b..fd4c9d81af84a28600bec332c6f45176f7c0a89c 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -606,7 +606,6 @@ source_set("v8_base") {
     "src/fast-dtoa.cc",
     "src/fast-dtoa.h",
     "src/feedback-slots.h",
-    "src/field-index.cc",
     "src/field-index.h",
     "src/field-index-inl.h",
     "src/fixed-dtoa.cc",
index 45d2f14347afe181421fd966a05ce27f32635687..59f966722045ab2b3f72aa13ed04b0423f638fcf 100644 (file)
@@ -2497,11 +2497,8 @@ void Genesis::TransferNamedProperties(Handle<JSObject> from,
           JSObject::SetNormalizedProperty(to, key, callbacks, d);
           break;
         }
+        // Do not occur since the from object has fast properties.
         case NORMAL:
-          // Do not occur since the from object has fast properties.
-        case HANDLER:
-        case INTERCEPTOR:
-          // No element in instance descriptors have proxy or interceptor type.
           UNREACHABLE();
           break;
       }
index fc5fdef968c24844c4e5f599886288d5516c4c1c..e347c1393c8786a22e794c2c174979e24fac7b55 100644 (file)
@@ -994,6 +994,13 @@ void StoreFieldStub::InstallDescriptors(Isolate* isolate) {
 }
 
 
+// static
+void LoadFastElementStub::InstallDescriptors(Isolate* isolate) {
+  LoadFastElementStub stub(isolate, true, FAST_ELEMENTS);
+  InstallDescriptor(isolate, &stub);
+}
+
+
 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate)
     : PlatformCodeStub(isolate) {
   minor_key_ = ArgumentCountBits::encode(ANY);
index dea29dcbc55e01354251880e22509182ef0ae0bb..85314d0d307f86ffdf3d0946e8756647e41c3f7c 100644 (file)
@@ -2114,6 +2114,8 @@ class LoadFastElementStub : public HydrogenCodeStub {
 
   virtual Handle<Code> GenerateCode() V8_OVERRIDE;
 
+  static void InstallDescriptors(Isolate* isolate);
+
   virtual void InitializeInterfaceDescriptor(
       CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
 
diff --git a/src/field-index.cc b/src/field-index.cc
deleted file mode 100644 (file)
index 5392afc..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "src/v8.h"
-
-#include "src/field-index.h"
-#include "src/objects.h"
-#include "src/objects-inl.h"
-
-namespace v8 {
-namespace internal {
-
-
-FieldIndex FieldIndex::ForLookupResult(const LookupResult* lookup_result) {
-  Map* map = lookup_result->holder()->map();
-  return ForPropertyIndex(map,
-                          lookup_result->GetFieldIndexFromMap(map),
-                          lookup_result->representation().IsDouble());
-}
-
-
-} }  // namespace v8::internal
index 8650c8fb8fdeb4dadbb1fb75463f8b09b5fe8914..78b5db1190c8ec6a3c6a8126d72898440ac984e5 100644 (file)
@@ -23,7 +23,6 @@ class FieldIndex V8_FINAL {
                                      int index,
                                      bool is_double = false);
   static FieldIndex ForInObjectOffset(int offset, Map* map = NULL);
-  static FieldIndex ForLookupResult(const LookupResult* result);
   static FieldIndex ForDescriptor(Map* map, int descriptor_index);
   static FieldIndex ForLoadByFieldIndex(Map* map, int index);
   static FieldIndex ForKeyedLookupCacheIndex(Map* map, int index);
index 50fdec55573363c55aaaa7286291d613a3900edd..c3287031970de31f8626b36461aea93273378ede 100644 (file)
@@ -1697,8 +1697,7 @@ void V8HeapExplorer::ExtractPropertyReferences(JSObject* js_obj, int entry) {
               descs->GetKey(i), descs->GetValue(i));
           break;
         case NORMAL:  // only in slow mode
-        case HANDLER:  // only in lookup results, not in descriptors
-        case INTERCEPTOR:  // only in lookup results, not in descriptors
+          UNREACHABLE();
           break;
       }
     }
index b43dc51d1beef4eb21d7ff789d1c22ebc8b40271..dd237715c92bea23ee5c65d99c34c8e3b8961b61 100644 (file)
@@ -5790,8 +5790,8 @@ HInstruction* HOptimizedGraphBuilder::BuildLoadNamedField(
     PropertyAccessInfo* info,
     HValue* checked_object) {
   // See if this is a load for an immutable property
-  if (checked_object->ActualValue()->IsConstant() && info->IsCacheable() &&
-      info->IsReadOnly() && !info->IsConfigurable()) {
+  if (checked_object->ActualValue()->IsConstant() && info->IsReadOnly() &&
+      !info->IsConfigurable()) {
     Handle<Object> object(
         HConstant::cast(checked_object->ActualValue())->handle(isolate()));
 
@@ -5970,7 +5970,7 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LookupDescriptor() {
 
 
 bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadResult(Handle<Map> map) {
-  if (!IsLoad() && IsProperty() && (IsReadOnly() || !IsCacheable())) {
+  if (!IsLoad() && IsProperty() && IsReadOnly()) {
     return false;
   }
 
@@ -6074,10 +6074,7 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::CanAccessMonomorphic() {
     return IsLoad();
   }
   if (!LookupDescriptor()) return false;
-  if (IsFound()) {
-    if (IsLoad()) return true;
-    return !IsReadOnly() && IsCacheable();
-  }
+  if (IsFound()) return IsLoad() || !IsReadOnly();
   if (!LookupInPrototypes()) return false;
   if (IsLoad()) return true;
 
index 158322ffbebf37ef584faf1d4c1cc43b936b0d7a..8e084ded9a5bda7a762ef40438dcd564fdf8d9ea 100644 (file)
@@ -2512,7 +2512,6 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
 
     bool IsConfigurable() const { return lookup_.IsConfigurable(); }
     bool IsReadOnly() const { return lookup_.IsReadOnly(); }
-    bool IsCacheable() const { return lookup_.IsCacheable(); }
 
    private:
     Handle<Object> GetAccessorsFromMap(Handle<Map> map) const {
index 95c5290c950a4fa74d93ca53b4fc2da479483c94..9b13982de488da03c1c77e947763b350fa8afdfc 100644 (file)
@@ -2053,6 +2053,7 @@ bool Isolate::Init(Deserializer* des) {
     RegExpConstructResultStub::InstallDescriptors(this);
     KeyedLoadGenericStub::InstallDescriptors(this);
     StoreFieldStub::InstallDescriptors(this);
+    LoadFastElementStub::InstallDescriptors(this);
   }
 
   CallDescriptors::InitializeForIsolate(this);
index 5bce620abd1e0bacdbcfc08b4f7e3bd98d7d4b22..3b11ebce798c56fa04ffc11b568348f75f727412 100644 (file)
@@ -119,9 +119,6 @@ void LookupIterator::LoadPropertyKind() {
     case v8::internal::CALLBACKS:
       property_kind_ = ACCESSOR;
       break;
-    case v8::internal::HANDLER:
-    case v8::internal::INTERCEPTOR:
-      UNREACHABLE();
   }
 }
 
index b3058602878ffe111aa633687a37e8932a3a8c44..b13b3fa8b2457f28ab0e0c7be00ff5547f943ac3 100644 (file)
@@ -177,8 +177,6 @@ PropertyType.Normal                  = 0;
 PropertyType.Field                   = 1;
 PropertyType.Constant                = 2;
 PropertyType.Callbacks               = 3;
-PropertyType.Handler                 = 4;
-PropertyType.Interceptor             = 5;
 
 
 // Different attributes for a property.
@@ -1367,10 +1365,11 @@ function PropertyMirror(mirror, name, details) {
   this.name_ = name;
   this.value_ = details[0];
   this.details_ = details[1];
-  if (details.length > 2) {
-    this.exception_ = details[2];
-    this.getter_ = details[3];
-    this.setter_ = details[4];
+  this.is_interceptor_ = details[2];
+  if (details.length > 3) {
+    this.exception_ = details[3];
+    this.getter_ = details[4];
+    this.setter_ = details[5];
   }
 }
 inherits(PropertyMirror, Mirror);
@@ -1488,7 +1487,7 @@ PropertyMirror.prototype.setter = function() {
  *     UndefinedMirror if there is no setter for this property
  */
 PropertyMirror.prototype.isNative = function() {
-  return (this.propertyType() == PropertyType.Interceptor) ||
+  return this.is_interceptor_ ||
          ((this.propertyType() == PropertyType.Callbacks) &&
           !this.hasGetter() && !this.hasSetter());
 };
index 3d29164938183a78d612d55187c7e94596576d58..617a8f22ab68a51baf87f547d60c3f4833d71ea7 100644 (file)
@@ -240,8 +240,6 @@ void JSObject::PrintProperties(OStream& os) {  // NOLINT
           os << Brief(descs->GetCallbacksObject(i)) << " (callback)\n";
           break;
         case NORMAL:  // only in slow mode
-        case HANDLER:  // only in lookup results, not in descriptors
-        case INTERCEPTOR:  // only in lookup results, not in descriptors
           UNREACHABLE();
           break;
       }
@@ -373,8 +371,6 @@ void JSObject::PrintTransitions(OStream& os) {  // NOLINT
           break;
         // Values below are never in the target descriptor array.
         case NORMAL:
-        case HANDLER:
-        case INTERCEPTOR:
           UNREACHABLE();
           break;
       }
@@ -1102,8 +1098,6 @@ void TransitionArray::PrintTransitions(OStream& os) {  // NOLINT
         break;
       // Values below are never in the target descriptor array.
       case NORMAL:
-      case HANDLER:
-      case INTERCEPTOR:
         UNREACHABLE();
         break;
     }
index 3f1bdc6d31fc235703fbc05c9fe836ef5efcb8e4..7a4c6f5e803a552ecdfa13cc4f463ebaa2809c94 100644 (file)
@@ -2775,8 +2775,6 @@ MaybeHandle<Map> Map::TryUpdateInternal(Handle<Map> old_map) {
         break;
 
       case NORMAL:
-      case HANDLER:
-      case INTERCEPTOR:
         UNREACHABLE();
     }
   }
@@ -4230,9 +4228,6 @@ void JSObject::MigrateFastToSlow(Handle<JSObject> object,
         dictionary = NameDictionary::Add(dictionary, key, value, d);
         break;
       }
-      case INTERCEPTOR:
-        break;
-      case HANDLER:
       case NORMAL:
         UNREACHABLE();
         break;
@@ -6737,8 +6732,7 @@ bool DescriptorArray::CanHoldValue(int descriptor, Object* value) {
       return false;
 
     case NORMAL:
-    case INTERCEPTOR:
-    case HANDLER:
+      UNREACHABLE();
       break;
   }
 
index ee0dc02c09cb3ee40e97a7f18025d476a0aac77e..f75bcff049e29038dcab9f449cb7024bf909ee21 100644 (file)
@@ -50,10 +50,7 @@ enum PropertyType {
   // Only in fast mode.
   FIELD = 1,
   CONSTANT = 2,
-  CALLBACKS = 3,
-  // Only in lookup results, not in descriptors.
-  HANDLER = 4,
-  INTERCEPTOR = 5
+  CALLBACKS = 3
 };
 
 
@@ -264,22 +261,22 @@ class PropertyDetails BASE_EMBEDDED {
 
   // Bit fields in value_ (type, shift, size). Must be public so the
   // constants can be embedded in generated code.
-  class TypeField:                public BitField<PropertyType,       0,  3> {};
-  class AttributesField:          public BitField<PropertyAttributes, 3,  3> {};
+  class TypeField : public BitField<PropertyType, 0, 2> {};
+  class AttributesField : public BitField<PropertyAttributes, 2, 3> {};
 
   // Bit fields for normalized objects.
-  class DeletedField:             public BitField<uint32_t,           6,  1> {};
-  class DictionaryStorageField:   public BitField<uint32_t,           7, 24> {};
+  class DeletedField : public BitField<uint32_t, 5, 1> {};
+  class DictionaryStorageField : public BitField<uint32_t, 6, 24> {};
 
   // Bit fields for fast objects.
-  class RepresentationField:      public BitField<uint32_t,           6,  4> {};
-  class DescriptorPointer:        public BitField<uint32_t, 10,
-      kDescriptorIndexBitCount> {};  // NOLINT
-  class FieldIndexField:          public BitField<uint32_t,
-      10 + kDescriptorIndexBitCount,
-      kDescriptorIndexBitCount> {};  // NOLINT
+  class RepresentationField : public BitField<uint32_t, 5, 4> {};
+  class DescriptorPointer
+      : public BitField<uint32_t, 9, kDescriptorIndexBitCount> {};  // NOLINT
+  class FieldIndexField
+      : public BitField<uint32_t, 9 + kDescriptorIndexBitCount,
+                        kDescriptorIndexBitCount> {};  // NOLINT
   // All bits for fast objects must fix in a smi.
-  STATIC_ASSERT(10 + kDescriptorIndexBitCount + kDescriptorIndexBitCount <= 31);
+  STATIC_ASSERT(9 + kDescriptorIndexBitCount + kDescriptorIndexBitCount <= 31);
 
   static const int kInitialIndex = 1;
 
index 0cad6ed02c56df1f32eaf077045ade0c67f66185..efb58a28c789bf297e5f23b10a8c10bfc51cee92 100644 (file)
@@ -24,30 +24,9 @@ OStream& operator<<(OStream& os, const LookupResult& r) {
   if (!r.IsFound()) return os << "Not Found\n";
 
   os << "LookupResult:\n";
-  os << " -cacheable = " << (r.IsCacheable() ? "true" : "false") << "\n";
-  os << " -attributes = " << hex << r.GetAttributes() << dec << "\n";
   if (r.IsTransition()) {
     os << " -transition target:\n" << Brief(r.GetTransitionTarget()) << "\n";
   }
-  switch (r.type()) {
-    case NORMAL:
-      return os << " -type = normal\n"
-                << " -entry = " << r.GetDictionaryEntry() << "\n";
-    case CONSTANT:
-      return os << " -type = constant\n";
-    case FIELD:
-      os << " -type = field\n"
-         << " -index = " << r.GetFieldIndex().property_index() << "\n"
-         << " -field type:";
-      r.GetFieldType()->PrintTo(os);
-      return os << "\n";
-    case CALLBACKS:
-      return os << " -type = call backs\n";
-    case HANDLER:
-      return os << " -type = lookup proxy\n";
-    case INTERCEPTOR:
-      return os << " -type = lookup interceptor\n";
-  }
   return os;
 }
 
index f64f9df849f0ef5af68824c4a4ebe96edb4e3830..21bc2fcb9c3d62c4ace6277888f890c1f82761e6 100644 (file)
@@ -119,7 +119,6 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
         lookup_type_(NOT_FOUND),
         holder_(NULL),
         transition_(NULL),
-        cacheable_(true),
         details_(NONE, NORMAL, Representation::None()) {
     isolate->set_top_lookup_result(this);
   }
@@ -139,30 +138,6 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
     number_ = number;
   }
 
-  bool CanHoldValue(Handle<Object> value) const {
-    switch (type()) {
-      case NORMAL:
-        return true;
-      case FIELD:
-        return value->FitsRepresentation(representation()) &&
-            GetFieldType()->NowContains(value);
-      case CONSTANT: {
-        Map* map =
-            lookup_type_ == DESCRIPTOR_TYPE ? holder_->map() : transition_;
-        Object* constant = GetConstantFromMap(map);
-        DCHECK(constant != *value ||
-               value->FitsRepresentation(representation()));
-        return constant == *value;
-      }
-      case CALLBACKS:
-      case HANDLER:
-      case INTERCEPTOR:
-        return true;
-    }
-    UNREACHABLE();
-    return true;
-  }
-
   void TransitionResult(JSObject* holder, Map* target) {
     lookup_type_ = TRANSITION_TYPE;
     number_ = target->LastAdded();
@@ -171,29 +146,6 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
     transition_ = target;
   }
 
-  void DictionaryResult(JSObject* holder, int entry) {
-    lookup_type_ = DICTIONARY_TYPE;
-    holder_ = holder;
-    transition_ = NULL;
-    details_ = holder->property_dictionary()->DetailsAt(entry);
-    number_ = entry;
-  }
-
-  void HandlerResult(JSProxy* proxy) {
-    lookup_type_ = HANDLER_TYPE;
-    holder_ = proxy;
-    transition_ = NULL;
-    details_ = PropertyDetails(NONE, HANDLER, Representation::Tagged());
-    cacheable_ = false;
-  }
-
-  void InterceptorResult(JSObject* holder) {
-    lookup_type_ = INTERCEPTOR_TYPE;
-    holder_ = holder;
-    transition_ = NULL;
-    details_ = PropertyDetails(NONE, INTERCEPTOR, Representation::Tagged());
-  }
-
   void NotFound() {
     lookup_type_ = NOT_FOUND;
     details_ = PropertyDetails(NONE, NORMAL, Representation::None());
@@ -201,40 +153,11 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
     transition_ = NULL;
   }
 
-  JSObject* holder() const {
-    DCHECK(IsFound());
-    return JSObject::cast(holder_);
-  }
-
-  JSProxy* proxy() const {
-    DCHECK(IsHandler());
-    return JSProxy::cast(holder_);
-  }
-
-  PropertyType type() const {
-    DCHECK(IsFound());
-    return details_.type();
-  }
-
   Representation representation() const {
     DCHECK(IsFound());
     return details_.representation();
   }
 
-  PropertyAttributes GetAttributes() const {
-    DCHECK(IsFound());
-    return details_.attributes();
-  }
-
-  PropertyDetails GetPropertyDetails() const {
-    return details_;
-  }
-
-  bool IsFastPropertyType() const {
-    DCHECK(IsFound());
-    return IsTransition() || type() != NORMAL;
-  }
-
   // Property callbacks does not include transitions to callbacks.
   bool IsPropertyCallbacks() const {
     DCHECK(!(details_.type() == CALLBACKS && !IsFound()));
@@ -248,36 +171,23 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
 
   bool IsField() const {
     DCHECK(!(details_.type() == FIELD && !IsFound()));
-    return IsDescriptorOrDictionary() && type() == FIELD;
-  }
-
-  bool IsNormal() const {
-    return IsFound() && IsDescriptorOrDictionary() && type() == NORMAL;
+    return lookup_type_ == DESCRIPTOR_TYPE && details_.type() == FIELD;
   }
 
   bool IsConstant() const {
     DCHECK(!(details_.type() == CONSTANT && !IsFound()));
-    return IsDescriptorOrDictionary() && type() == CONSTANT;
+    return lookup_type_ == DESCRIPTOR_TYPE && details_.type() == CONSTANT;
   }
 
   bool IsConfigurable() const { return details_.IsConfigurable(); }
-  bool IsDontEnum() const { return details_.IsDontEnum(); }
   bool IsFound() const { return lookup_type_ != NOT_FOUND; }
-  bool IsDescriptorOrDictionary() const {
-    return lookup_type_ == DESCRIPTOR_TYPE || lookup_type_ == DICTIONARY_TYPE;
-  }
   bool IsTransition() const { return lookup_type_ == TRANSITION_TYPE; }
-  bool IsHandler() const { return lookup_type_ == HANDLER_TYPE; }
-  bool IsInterceptor() const { return lookup_type_ == INTERCEPTOR_TYPE; }
 
   // Is the result is a property excluding transitions and the null descriptor?
   bool IsProperty() const {
     return IsFound() && !IsTransition();
   }
 
-  bool IsCacheable() const { return cacheable_; }
-  void DisallowCaching() { cacheable_ = false; }
-
   Map* GetTransitionTarget() const {
     DCHECK(IsTransition());
     return transition_;
@@ -287,32 +197,12 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
     return IsTransition() && details_.type() == FIELD;
   }
 
-  bool IsTransitionToConstant() const {
-    return IsTransition() && details_.type() == CONSTANT;
-  }
-
-  int GetDescriptorIndex() const {
-    DCHECK(lookup_type_ == DESCRIPTOR_TYPE);
-    return number_;
-  }
-
-  FieldIndex GetFieldIndex() const {
-    DCHECK(lookup_type_ == DESCRIPTOR_TYPE ||
-           lookup_type_ == TRANSITION_TYPE);
-    return FieldIndex::ForLookupResult(this);
-  }
-
   int GetLocalFieldIndexFromMap(Map* map) const {
     return GetFieldIndexFromMap(map) - map->inobject_properties();
   }
 
-  int GetDictionaryEntry() const {
-    DCHECK(lookup_type_ == DICTIONARY_TYPE);
-    return number_;
-  }
-
   Object* GetConstantFromMap(Map* map) const {
-    DCHECK(type() == CONSTANT);
+    DCHECK(details_.type() == CONSTANT);
     return GetValueFromMap(map);
   }
 
@@ -330,26 +220,12 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
     return map->instance_descriptors()->GetFieldIndex(number_);
   }
 
-  HeapType* GetFieldType() const {
-    DCHECK(type() == FIELD);
-    if (lookup_type_ == DESCRIPTOR_TYPE) {
-      return GetFieldTypeFromMap(holder()->map());
-    }
-    DCHECK(lookup_type_ == TRANSITION_TYPE);
-    return GetFieldTypeFromMap(transition_);
-  }
-
   HeapType* GetFieldTypeFromMap(Map* map) const {
-    DCHECK(lookup_type_ == DESCRIPTOR_TYPE ||
-           lookup_type_ == TRANSITION_TYPE);
+    DCHECK_NE(NOT_FOUND, lookup_type_);
     DCHECK(number_ < map->NumberOfOwnDescriptors());
     return map->instance_descriptors()->GetFieldType(number_);
   }
 
-  Map* GetFieldOwner() const {
-    return GetFieldOwnerFromMap(holder()->map());
-  }
-
   Map* GetFieldOwnerFromMap(Map* map) const {
     DCHECK(lookup_type_ == DESCRIPTOR_TYPE ||
            lookup_type_ == TRANSITION_TYPE);
@@ -357,12 +233,6 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
     return map->FindFieldOwner(number_);
   }
 
-  bool ReceiverIsHolder(Handle<Object> receiver) {
-    if (*receiver == holder()) return true;
-    if (lookup_type_ == TRANSITION_TYPE) return true;
-    return false;
-  }
-
   void Iterate(ObjectVisitor* visitor);
 
  private:
@@ -370,19 +240,11 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
   LookupResult* next_;
 
   // Where did we find the result;
-  enum {
-    NOT_FOUND,
-    DESCRIPTOR_TYPE,
-    TRANSITION_TYPE,
-    DICTIONARY_TYPE,
-    HANDLER_TYPE,
-    INTERCEPTOR_TYPE
-  } lookup_type_;
+  enum { NOT_FOUND, DESCRIPTOR_TYPE, TRANSITION_TYPE } lookup_type_;
 
   JSReceiver* holder_;
   Map* transition_;
   int number_;
-  bool cacheable_;
   PropertyDetails details_;
 };
 
index 0628ce44f3e06a38a7e8497839ab8239871de10c..c69882f5a36b2de7a517bfd0a79cd12eb16296fd 100644 (file)
@@ -10999,18 +10999,20 @@ RUNTIME_FUNCTION(Runtime_DebugGetPropertyDetails) {
   // getter and/or setter.
   bool has_js_accessors = !maybe_pair.is_null() && maybe_pair->IsAccessorPair();
   Handle<FixedArray> details =
-      isolate->factory()->NewFixedArray(has_js_accessors ? 5 : 2);
+      isolate->factory()->NewFixedArray(has_js_accessors ? 6 : 3);
   details->set(0, *value);
   // TODO(verwaest): Get rid of this random way of handling interceptors.
   PropertyDetails d = it.state() == LookupIterator::INTERCEPTOR
-                          ? PropertyDetails(NONE, INTERCEPTOR, 0)
+                          ? PropertyDetails(NONE, NORMAL, 0)
                           : it.property_details();
   details->set(1, d.AsSmi());
+  details->set(
+      2, isolate->heap()->ToBoolean(it.state() == LookupIterator::INTERCEPTOR));
   if (has_js_accessors) {
     AccessorPair* accessors = AccessorPair::cast(*maybe_pair);
-    details->set(2, isolate->heap()->ToBoolean(has_caught));
-    details->set(3, accessors->GetComponent(ACCESSOR_GETTER));
-    details->set(4, accessors->GetComponent(ACCESSOR_SETTER));
+    details->set(3, isolate->heap()->ToBoolean(has_caught));
+    details->set(4, accessors->GetComponent(ACCESSOR_GETTER));
+    details->set(5, accessors->GetComponent(ACCESSOR_SETTER));
   }
 
   return *isolate->factory()->NewJSArrayWithElements(details);
index c98d480a44c489bec5098e9eaefad72396465237..ba04df966a9cdffb59a9e6f125ea95f5340bae63 100644 (file)
@@ -4383,10 +4383,6 @@ TEST(InterceptorPropertyMirror) {
              "named_values[%d] instanceof debug.PropertyMirror", i);
     CHECK(CompileRun(buffer.start())->BooleanValue());
 
-    SNPrintF(buffer, "named_values[%d].propertyType()", i);
-    CHECK_EQ(v8::internal::INTERCEPTOR,
-             CompileRun(buffer.start())->Int32Value());
-
     SNPrintF(buffer, "named_values[%d].isNative()", i);
     CHECK(CompileRun(buffer.start())->BooleanValue());
   }
index 5ebfec4ab2b642992d6723fd820147bbe4240323..978017146555c398a0d23afd0807050b80973dfd 100644 (file)
         '../../src/fast-dtoa.cc',
         '../../src/fast-dtoa.h',
         '../../src/feedback-slots.h',
-        '../../src/field-index.cc',
         '../../src/field-index.h',
         '../../src/field-index-inl.h',
         '../../src/fixed-dtoa.cc',