]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/NameInstance.h
JavaScriptCore-7600.1.4.11.8.tar.gz
[apple/javascriptcore.git] / runtime / NameInstance.h
index e5aa79d970767507c57ef5d7084520720777cbdb..55842d52b89d3de7082713ab1d8dee7b318c057c 100644 (file)
@@ -35,11 +35,11 @@ class NameInstance : public JSDestructibleObject {
 public:
     typedef JSDestructibleObject Base;
 
-    static const ClassInfo s_info;
+    DECLARE_INFO;
 
     static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
     {
-        return Structure::create(vm, globalObject, prototype, TypeInfo(NameInstanceType, StructureFlags), &s_info);
+        return Structure::create(vm, globalObject, prototype, TypeInfo(NameInstanceType, StructureFlags), info());
     }
 
     static NameInstance* create(VM& vm, Structure* structure, JSString* nameString)
@@ -60,7 +60,7 @@ protected:
     void finishCreation(VM& vm)
     {
         Base::finishCreation(vm);
-        ASSERT(inherits(&s_info));
+        ASSERT(inherits(info()));
     }
 
     PrivateName m_privateName;
@@ -69,7 +69,7 @@ protected:
 
 inline bool isName(JSValue v)
 {
-    return v.isCell() && v.asCell()->structure()->typeInfo().isName();
+    return v.isCell() && v.asCell()->type() == NameInstanceType;
 }
 
 } // namespace JSC