Get rid of the NONEXISTENT PropertyType
authorverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 21 Aug 2014 08:16:06 +0000 (08:16 +0000)
committerverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 21 Aug 2014 08:16:06 +0000 (08:16 +0000)
BUG=

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

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

src/bootstrapper.cc
src/heap-snapshot-generator.cc
src/ic.cc
src/lookup.cc
src/lookup.h
src/mirror-debugger.js
src/objects-printer.cc
src/objects.cc
src/property-details.h
src/property.cc
src/property.h

index dbbe0ea..f3282b2 100644 (file)
@@ -2464,7 +2464,6 @@ void Genesis::TransferNamedProperties(Handle<JSObject> from,
           // Do not occur since the from object has fast properties.
         case HANDLER:
         case INTERCEPTOR:
-        case NONEXISTENT:
           // No element in instance descriptors have proxy or interceptor type.
           UNREACHABLE();
           break;
index 4646f4b..aaac48a 100644 (file)
@@ -1700,9 +1700,6 @@ void V8HeapExplorer::ExtractPropertyReferences(JSObject* js_obj, int entry) {
         case HANDLER:  // only in lookup results, not in descriptors
         case INTERCEPTOR:  // only in lookup results, not in descriptors
           break;
-        case NONEXISTENT:
-          UNREACHABLE();
-          break;
       }
     }
   } else {
index fdad0ca..ceed585 100644 (file)
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1597,7 +1597,6 @@ Handle<Code> StoreIC::CompileStoreHandler(LookupResult* lookup,
       }
       case CONSTANT:
         break;
-      case NONEXISTENT:
       case HANDLER:
         UNREACHABLE();
         break;
index 3943bf3..719d4fa 100644 (file)
@@ -100,7 +100,6 @@ bool LookupIterator::HasProperty() {
       property_kind_ = ACCESSOR;
       break;
     case v8::internal::HANDLER:
-    case v8::internal::NONEXISTENT:
     case v8::internal::INTERCEPTOR:
       UNREACHABLE();
   }
index 08dc54c..5e2b492 100644 (file)
@@ -70,7 +70,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
         state_(NOT_FOUND),
         property_kind_(DATA),
         property_encoding_(DESCRIPTOR),
-        property_details_(NONE, NONEXISTENT, Representation::None()),
+        property_details_(NONE, NORMAL, Representation::None()),
         isolate_(name->GetIsolate()),
         name_(name),
         maybe_receiver_(receiver),
@@ -88,7 +88,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
         state_(NOT_FOUND),
         property_kind_(DATA),
         property_encoding_(DESCRIPTOR),
-        property_details_(NONE, NONEXISTENT, Representation::None()),
+        property_details_(NONE, NORMAL, Representation::None()),
         isolate_(name->GetIsolate()),
         name_(name),
         holder_map_(holder->map()),
index 6da847f..b305860 100644 (file)
@@ -179,7 +179,6 @@ PropertyType.Constant                = 2;
 PropertyType.Callbacks               = 3;
 PropertyType.Handler                 = 4;
 PropertyType.Interceptor             = 5;
-PropertyType.Nonexistent             = 6;
 
 
 // Different attributes for a property.
index 8fbe218..3d29164 100644 (file)
@@ -242,8 +242,6 @@ void JSObject::PrintProperties(OStream& os) {  // NOLINT
         case NORMAL:  // only in slow mode
         case HANDLER:  // only in lookup results, not in descriptors
         case INTERCEPTOR:  // only in lookup results, not in descriptors
-        // There are no transitions in the descriptor array.
-        case NONEXISTENT:
           UNREACHABLE();
           break;
       }
@@ -377,7 +375,6 @@ void JSObject::PrintTransitions(OStream& os) {  // NOLINT
         case NORMAL:
         case HANDLER:
         case INTERCEPTOR:
-        case NONEXISTENT:
           UNREACHABLE();
           break;
       }
@@ -1107,7 +1104,6 @@ void TransitionArray::PrintTransitions(OStream& os) {  // NOLINT
       case NORMAL:
       case HANDLER:
       case INTERCEPTOR:
-      case NONEXISTENT:
         UNREACHABLE();
         break;
     }
index a784b1d..70e218b 100644 (file)
@@ -2774,7 +2774,6 @@ MaybeHandle<Map> Map::TryUpdateInternal(Handle<Map> old_map) {
       case NORMAL:
       case HANDLER:
       case INTERCEPTOR:
-      case NONEXISTENT:
         UNREACHABLE();
     }
   }
@@ -4264,7 +4263,6 @@ void JSObject::MigrateFastToSlow(Handle<JSObject> object,
         break;
       case HANDLER:
       case NORMAL:
-      case NONEXISTENT:
         UNREACHABLE();
         break;
     }
@@ -6823,7 +6821,6 @@ bool DescriptorArray::CanHoldValue(int descriptor, Object* value) {
     case NORMAL:
     case INTERCEPTOR:
     case HANDLER:
-    case NONEXISTENT:
       break;
   }
 
index 7eb2e4e..960c46c 100644 (file)
@@ -46,16 +46,14 @@ class TypeInfo;
 // A copy of this is in mirror-debugger.js.
 enum PropertyType {
   // Only in slow mode.
-  NORMAL                    = 0,
+  NORMAL = 0,
   // Only in fast mode.
-  FIELD                     = 1,
-  CONSTANT                  = 2,
-  CALLBACKS                 = 3,
+  FIELD = 1,
+  CONSTANT = 2,
+  CALLBACKS = 3,
   // Only in lookup results, not in descriptors.
-  HANDLER                   = 4,
-  INTERCEPTOR               = 5,
-  // Only used as a marker in LookupResult.
-  NONEXISTENT               = 6
+  HANDLER = 4,
+  INTERCEPTOR = 5
 };
 
 
index 9688396..0cad6ed 100644 (file)
@@ -47,9 +47,6 @@ OStream& operator<<(OStream& os, const LookupResult& r) {
       return os << " -type = lookup proxy\n";
     case INTERCEPTOR:
       return os << " -type = lookup interceptor\n";
-    case NONEXISTENT:
-      UNREACHABLE();
-      break;
   }
   return os;
 }
index a1e8011..125f927 100644 (file)
@@ -120,7 +120,7 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
         holder_(NULL),
         transition_(NULL),
         cacheable_(true),
-        details_(NONE, NONEXISTENT, Representation::None()) {
+        details_(NONE, NORMAL, Representation::None()) {
     isolate->set_top_lookup_result(this);
   }
 
@@ -158,8 +158,6 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
       case HANDLER:
       case INTERCEPTOR:
         return true;
-      case NONEXISTENT:
-        UNREACHABLE();
     }
     UNREACHABLE();
     return true;
@@ -198,7 +196,7 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
 
   void NotFound() {
     lookup_type_ = NOT_FOUND;
-    details_ = PropertyDetails(NONE, NONEXISTENT, Representation::None());
+    details_ = PropertyDetails(NONE, NORMAL, Representation::None());
     holder_ = NULL;
     transition_ = NULL;
   }
@@ -220,13 +218,11 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
 
   Representation representation() const {
     DCHECK(IsFound());
-    DCHECK(details_.type() != NONEXISTENT);
     return details_.representation();
   }
 
   PropertyAttributes GetAttributes() const {
     DCHECK(IsFound());
-    DCHECK(details_.type() != NONEXISTENT);
     return details_.attributes();
   }
 
@@ -247,7 +243,6 @@ class LookupResult V8_FINAL BASE_EMBEDDED {
 
   bool IsReadOnly() const {
     DCHECK(IsFound());
-    DCHECK(details_.type() != NONEXISTENT);
     return details_.IsReadOnly();
   }