Revision: 23267
Author:   [email protected]
Date:     Thu Aug 21 09:34:47 2014 UTC
Log:      Rename IsDontDelete to IsConfigurable (and invert conditions)

BUG=
[email protected]

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

Modified:
 /branches/bleeding_edge/src/elements.cc
 /branches/bleeding_edge/src/hydrogen-instructions.cc
 /branches/bleeding_edge/src/hydrogen-instructions.h
 /branches/bleeding_edge/src/hydrogen.h
 /branches/bleeding_edge/src/lookup.h
 /branches/bleeding_edge/src/objects.cc
 /branches/bleeding_edge/src/property-details.h
 /branches/bleeding_edge/src/property.h

=======================================
--- /branches/bleeding_edge/src/elements.cc     Wed Aug 20 14:26:02 2014 UTC
+++ /branches/bleeding_edge/src/elements.cc     Thu Aug 21 09:34:47 2014 UTC
@@ -1364,7 +1364,7 @@
           uint32_t number = static_cast<uint32_t>(key->Number());
           if (new_length <= number && number < old_length) {
             PropertyDetails details = dict->DetailsAt(i);
-            if (details.IsDontDelete()) new_length = number + 1;
+            if (!details.IsConfigurable()) new_length = number + 1;
           }
         }
       }
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Wed Aug 20 15:08:20 2014 UTC +++ /branches/bleeding_edge/src/hydrogen-instructions.cc Thu Aug 21 09:34:47 2014 UTC
@@ -3584,14 +3584,14 @@

 OStream& HLoadGlobalCell::PrintDataTo(OStream& os) const {  // NOLINT
   os << "[" << *cell().handle() << "]";
-  if (!details_.IsDontDelete()) os << " (deleteable)";
+  if (details_.IsConfigurable()) os << " (configurable)";
   if (details_.IsReadOnly()) os << " (read-only)";
   return os;
 }


 bool HLoadGlobalCell::RequiresHoleCheck() const {
-  if (details_.IsDontDelete() && !details_.IsReadOnly()) return false;
+  if (!details_.IsConfigurable()) return false;
   for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
     HValue* use = it.value();
     if (!use->IsChange()) return true;
@@ -3613,7 +3613,7 @@

 OStream& HStoreGlobalCell::PrintDataTo(OStream& os) const {  // NOLINT
   os << "[" << *cell().handle() << "] = " << NameOf(value());
-  if (!details_.IsDontDelete()) os << " (deleteable)";
+  if (details_.IsConfigurable()) os << " (configurable)";
   if (details_.IsReadOnly()) os << " (read-only)";
   return os;
 }
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Wed Aug 20 15:08:20 2014 UTC +++ /branches/bleeding_edge/src/hydrogen-instructions.h Thu Aug 21 09:34:47 2014 UTC
@@ -5793,9 +5793,7 @@
                                  Handle<PropertyCell>, PropertyDetails);

   Unique<PropertyCell> cell() const { return cell_; }
-  bool RequiresHoleCheck() {
-    return !details_.IsDontDelete() || details_.IsReadOnly();
-  }
+  bool RequiresHoleCheck() { return details_.IsConfigurable(); }
   bool NeedsWriteBarrier() {
     return StoringValueNeedsWriteBarrier(value());
   }
=======================================
--- /branches/bleeding_edge/src/hydrogen.h      Thu Aug 21 08:37:59 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen.h      Thu Aug 21 09:34:47 2014 UTC
@@ -2510,7 +2510,7 @@
     bool IsAccessor() const { return lookup_.IsPropertyCallbacks(); }
     bool IsTransition() const { return lookup_.IsTransition(); }

-    bool IsConfigurable() const { return !lookup_.IsDontDelete(); }
+    bool IsConfigurable() const { return lookup_.IsConfigurable(); }
     bool IsReadOnly() const { return lookup_.IsReadOnly(); }
     bool IsCacheable() const { return lookup_.IsCacheable(); }

=======================================
--- /branches/bleeding_edge/src/lookup.h        Thu Aug 21 08:16:06 2014 UTC
+++ /branches/bleeding_edge/src/lookup.h        Thu Aug 21 09:34:47 2014 UTC
@@ -153,7 +153,7 @@
     DCHECK(has_property_);
     return property_details_;
   }
- bool IsConfigurable() const { return !property_details().IsDontDelete(); } + bool IsConfigurable() const { return property_details().IsConfigurable(); }
   bool IsReadOnly() const { return property_details().IsReadOnly(); }
   Representation representation() const {
     return property_details().representation();
=======================================
--- /branches/bleeding_edge/src/objects.cc      Thu Aug 21 08:26:42 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc      Thu Aug 21 09:34:47 2014 UTC
@@ -709,11 +709,11 @@
     // If we have a global object set the cell to the hole.
     if (object->IsGlobalObject()) {
       PropertyDetails details = dictionary->DetailsAt(entry);
-      if (details.IsDontDelete()) {
+      if (!details.IsConfigurable()) {
if (mode != FORCE_DELETION) return isolate->factory()->false_value();
         // When forced to delete global properties, we have to make a
         // map change to invalidate any ICs that think they can load
-        // from the DontDelete cell without checking if it contains
+        // from the non-configurable cell without checking if it contains
         // the hole value.
Handle<Map> new_map = Map::CopyDropDescriptors(handle(object->map()));
         DCHECK(new_map->is_dictionary_map());
@@ -6008,7 +6008,7 @@
     Object* result = dictionary->ValueAt(entry);
     PropertyDetails details = dictionary->DetailsAt(entry);
     if (details.type() == CALLBACKS && result->IsAccessorPair()) {
-      DCHECK(!details.IsDontDelete());
+      DCHECK(details.IsConfigurable());
       if (details.attributes() != attributes) {
         dictionary->DetailsAtPut(
             entry,
@@ -15121,7 +15121,7 @@
   Factory* factory = dictionary->GetIsolate()->factory();
   PropertyDetails details = dictionary->DetailsAt(entry);
   // Ignore attributes if forcing a deletion.
-  if (details.IsDontDelete() && mode != JSReceiver::FORCE_DELETION) {
+  if (!details.IsConfigurable() && mode != JSReceiver::FORCE_DELETION) {
     return factory->false_value();
   }

=======================================
--- /branches/bleeding_edge/src/property-details.h Thu Aug 21 08:16:06 2014 UTC +++ /branches/bleeding_edge/src/property-details.h Thu Aug 21 09:34:47 2014 UTC
@@ -260,7 +260,7 @@
   }

   bool IsReadOnly() const { return (attributes() & READ_ONLY) != 0; }
-  bool IsDontDelete() const { return (attributes() & DONT_DELETE) != 0; }
+  bool IsConfigurable() const { return (attributes() & DONT_DELETE) == 0; }
   bool IsDontEnum() const { return (attributes() & DONT_ENUM) != 0; }
   bool IsDeleted() const { return DeletedField::decode(value_) != 0;}

=======================================
--- /branches/bleeding_edge/src/property.h      Thu Aug 21 08:19:05 2014 UTC
+++ /branches/bleeding_edge/src/property.h      Thu Aug 21 09:34:47 2014 UTC
@@ -260,7 +260,7 @@
     return IsDescriptorOrDictionary() && type() == CONSTANT;
   }

-  bool IsDontDelete() const { return details_.IsDontDelete(); }
+  bool IsConfigurable() const { return details_.IsConfigurable(); }
   bool IsDontEnum() const { return details_.IsDontEnum(); }
   bool IsFound() const { return lookup_type_ != NOT_FOUND; }
   bool IsDescriptorOrDictionary() const {

--
--
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