]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/PropertyNameArray.cpp
JavaScriptCore-721.26.tar.gz
[apple/javascriptcore.git] / runtime / PropertyNameArray.cpp
index 0878e73f879da6b0923227fbc5d488d922bcdff5..6b246691ba24af4b596cdbd2e719a271d480998f 100644 (file)
 #include "config.h"
 #include "PropertyNameArray.h"
 
+#include "Structure.h"
+#include "StructureChain.h"
+
 namespace JSC {
 
 static const size_t setThreshold = 20;
 
 void PropertyNameArray::add(UString::Rep* identifier)
 {
-    ASSERT(identifier == &UString::Rep::null() || identifier == &UString::Rep::empty() || identifier->identifierTable());
+    ASSERT(identifier == UString::null().rep() || identifier == UString::Rep::empty() || identifier->isIdentifier());
 
     size_t size = m_data->propertyNameVector().size();
     if (size < setThreshold) {
@@ -44,7 +47,7 @@ void PropertyNameArray::add(UString::Rep* identifier)
             return;
     }
 
-    m_data->propertyNameVector().append(Identifier(m_globalData, identifier));
+    addKnownUnique(identifier);
 }
 
 } // namespace JSC