Removing superfluous IsSmi check from DescriptorArray::IsEmpty.
authorverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 18 Jun 2012 12:42:46 +0000 (12:42 +0000)
committerverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 18 Jun 2012 12:42:46 +0000 (12:42 +0000)
DescriptorArray::IsEmpty is never called with a Smi.

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

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

src/objects-inl.h

index 93e0b39..8292b04 100644 (file)
@@ -1874,15 +1874,14 @@ Object** FixedArray::data_start() {
 
 
 bool DescriptorArray::IsEmpty() {
-  ASSERT(this->IsSmi() ||
-         this->MayContainTransitions() ||
+  ASSERT(length() >= kFirstIndex ||
          this == HEAP->empty_descriptor_array());
-  return this->IsSmi() || length() < kFirstIndex;
+  return length() < kFirstIndex;
 }
 
 
 bool DescriptorArray::MayContainTransitions() {
-  return length() >= kTransitionsIndex;
+  return !IsEmpty();
 }