Revert r85550 and r85575.
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 May 2011 15:41:28 +0000 (15:41 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 May 2011 15:41:28 +0000 (15:41 +0000)
Rubber-stamped by Adam Roben.

Variables cannot be exported via the .def file. Instead, they should be annotated with
JS_EXPORTDATA.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/Structure.cpp:
(JSC::Structure::materializePropertyMap):
* runtime/Structure.h:
(JSC::Structure::typeInfo):
(JSC::Structure::previousID):
(JSC::Structure::propertyStorageCapacity):
(JSC::Structure::propertyStorageSize):
(JSC::Structure::get):
(JSC::Structure::materializePropertyMapIfNecessary):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85605 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
Source/JavaScriptCore/runtime/Structure.cpp
Source/JavaScriptCore/runtime/Structure.h

index b6d5613..bbe1855 100644 (file)
@@ -1,3 +1,23 @@
+2011-05-03  Jessie Berlin  <jberlin@apple.com>
+
+        Rubber-stamped by Adam Roben.
+
+        Revert r85550 and r85575.
+
+        Variables cannot be exported via the .def file. Instead, they should be annotated with
+        JS_EXPORTDATA.
+
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+        * runtime/Structure.cpp:
+        (JSC::Structure::materializePropertyMap):
+        * runtime/Structure.h:
+        (JSC::Structure::typeInfo):
+        (JSC::Structure::previousID):
+        (JSC::Structure::propertyStorageCapacity):
+        (JSC::Structure::propertyStorageSize):
+        (JSC::Structure::get):
+        (JSC::Structure::materializePropertyMapIfNecessary):
+
 2011-05-02  Adam Roben  <aroben@apple.com>
 
         Allow implicit conversion from nullptr_t to PassOwnPtr
 2011-05-02  Adam Roben  <aroben@apple.com>
 
         Allow implicit conversion from nullptr_t to PassOwnPtr
index 4800523..6d19ee6 100644 (file)
@@ -295,7 +295,6 @@ EXPORTS
     ?restoreAll@Profile@JSC@@QAEXXZ
     ?retrieveCaller@Interpreter@JSC@@QBE?AVJSValue@2@PAVExecState@2@PAVJSFunction@2@@Z
     ?retrieveLastCaller@Interpreter@JSC@@QBEXPAVExecState@2@AAH1AAVUString@2@AAVJSValue@2@@Z
     ?restoreAll@Profile@JSC@@QAEXXZ
     ?retrieveCaller@Interpreter@JSC@@QBE?AVJSValue@2@PAVExecState@2@PAVJSFunction@2@@Z
     ?retrieveLastCaller@Interpreter@JSC@@QBEXPAVExecState@2@AAH1AAVUString@2@AAVJSValue@2@@Z
-    ?s_info@Structure@JSC@@0UClassInfo@2@B
     ?setAccessorDescriptor@PropertyDescriptor@JSC@@QAEXVJSValue@2@0I@Z
     ?setConfigurable@PropertyDescriptor@JSC@@QAEX_N@Z
     ?setDescriptor@PropertyDescriptor@JSC@@QAEXVJSValue@2@I@Z
     ?setAccessorDescriptor@PropertyDescriptor@JSC@@QAEXVJSValue@2@0I@Z
     ?setConfigurable@PropertyDescriptor@JSC@@QAEX_N@Z
     ?setDescriptor@PropertyDescriptor@JSC@@QAEXVJSValue@2@I@Z
index 8645bd2..6cb3927 100644 (file)
@@ -246,6 +246,7 @@ Structure::~Structure()
 
 void Structure::materializePropertyMap(JSGlobalData& globalData)
 {
 
 void Structure::materializePropertyMap(JSGlobalData& globalData)
 {
+    ASSERT(structure()->classInfo() == &s_info);
     ASSERT(!m_propertyTable);
 
     Vector<Structure*, 8> structures;
     ASSERT(!m_propertyTable);
 
     Vector<Structure*, 8> structures;
index 7556da9..f4e31a3 100644 (file)
@@ -98,18 +98,18 @@ namespace JSC {
         bool isDictionary() const { return m_dictionaryKind != NoneDictionaryKind; }
         bool isUncacheableDictionary() const { return m_dictionaryKind == UncachedDictionaryKind; }
 
         bool isDictionary() const { return m_dictionaryKind != NoneDictionaryKind; }
         bool isUncacheableDictionary() const { return m_dictionaryKind == UncachedDictionaryKind; }
 
-        const TypeInfo& typeInfo() const { return m_typeInfo; }
+        const TypeInfo& typeInfo() const { ASSERT(structure()->classInfo() == &s_info); return m_typeInfo; }
 
         JSValue storedPrototype() const { return m_prototype.get(); }
         JSValue prototypeForLookup(ExecState*) const;
         StructureChain* prototypeChain(ExecState*) const;
         void visitChildren(SlotVisitor&);
 
 
         JSValue storedPrototype() const { return m_prototype.get(); }
         JSValue prototypeForLookup(ExecState*) const;
         StructureChain* prototypeChain(ExecState*) const;
         void visitChildren(SlotVisitor&);
 
-        Structure* previousID() const { return m_previous.get(); }
+        Structure* previousID() const { ASSERT(structure()->classInfo() == &s_info); return m_previous.get(); }
 
         void growPropertyStorageCapacity();
 
         void growPropertyStorageCapacity();
-        unsigned propertyStorageCapacity() const { return m_propertyStorageCapacity; }
-        unsigned propertyStorageSize() const { return m_anonymousSlotCount + (m_propertyTable ? m_propertyTable->propertyStorageSize() : static_cast<unsigned>(m_offset + 1)); }
+        unsigned propertyStorageCapacity() const { ASSERT(structure()->classInfo() == &s_info); return m_propertyStorageCapacity; }
+        unsigned propertyStorageSize() const { ASSERT(structure()->classInfo() == &s_info); return m_anonymousSlotCount + (m_propertyTable ? m_propertyTable->propertyStorageSize() : static_cast<unsigned>(m_offset + 1)); }
         bool isUsingInlineStorage() const;
 
         size_t get(JSGlobalData&, const Identifier& propertyName);
         bool isUsingInlineStorage() const;
 
         size_t get(JSGlobalData&, const Identifier& propertyName);
@@ -117,6 +117,7 @@ namespace JSC {
         size_t get(JSGlobalData& globalData, const Identifier& propertyName, unsigned& attributes, JSCell*& specificValue)
         {
             ASSERT(!propertyName.isNull());
         size_t get(JSGlobalData& globalData, const Identifier& propertyName, unsigned& attributes, JSCell*& specificValue)
         {
             ASSERT(!propertyName.isNull());
+            ASSERT(structure()->classInfo() == &s_info);
             return get(globalData, propertyName.impl(), attributes, specificValue);
         }
 
             return get(globalData, propertyName.impl(), attributes, specificValue);
         }
 
@@ -171,7 +172,7 @@ namespace JSC {
             return new (&globalData) Structure(globalData, structure);
         }
         
             return new (&globalData) Structure(globalData, structure);
         }
         
-        static const ClassInfo s_info;
+        static JS_EXPORTDATA const ClassInfo s_info;
 
         typedef enum { 
             NoneDictionaryKind = 0,
 
         typedef enum { 
             NoneDictionaryKind = 0,
@@ -193,6 +194,7 @@ namespace JSC {
         void materializePropertyMap(JSGlobalData&);
         void materializePropertyMapIfNecessary(JSGlobalData& globalData)
         {
         void materializePropertyMap(JSGlobalData&);
         void materializePropertyMapIfNecessary(JSGlobalData& globalData)
         {
+            ASSERT(structure()->classInfo() == &s_info);
             if (!m_propertyTable && m_previous)
                 materializePropertyMap(globalData);
         }
             if (!m_propertyTable && m_previous)
                 materializePropertyMap(globalData);
         }
@@ -254,6 +256,7 @@ namespace JSC {
 
     inline size_t Structure::get(JSGlobalData& globalData, const Identifier& propertyName)
     {
 
     inline size_t Structure::get(JSGlobalData& globalData, const Identifier& propertyName)
     {
+        ASSERT(structure()->classInfo() == &s_info);
         materializePropertyMapIfNecessary(globalData);
         if (!m_propertyTable)
             return notFound;
         materializePropertyMapIfNecessary(globalData);
         if (!m_propertyTable)
             return notFound;