Optimize own property GetByVals with rope string subscripts.
[WebKit-https.git] / Source / JavaScriptCore / runtime / PropertyName.h
index 9e99f53..d739cef 100644 (file)
@@ -78,12 +78,17 @@ ALWAYS_INLINE uint32_t toUInt32FromStringImpl(StringImpl* impl)
 
 class PropertyName {
 public:
-    PropertyName(const Identifier& propertyName)
-        : m_impl(static_cast<AtomicStringImpl*>(propertyName.impl()))
+    PropertyName(AtomicStringImpl* propertyName)
+        : m_impl(propertyName)
     {
         ASSERT(!m_impl || m_impl->isAtomic());
     }
 
+    PropertyName(const Identifier& propertyName)
+        : PropertyName(static_cast<AtomicStringImpl*>(propertyName.impl()))
+    {
+    }
+
     PropertyName(const PrivateName& propertyName)
         : m_impl(static_cast<AtomicStringImpl*>(propertyName.uid()))
     {