Remove WTF_EXPORTDATA and JS_EXPORTDATA
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Mar 2018 04:16:30 +0000 (04:16 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Mar 2018 04:16:30 +0000 (04:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=184170

Reviewed by JF Bastien.

Replace WTF_EXPORTDATA and JS_EXPORTDATA with
WTF_EXPORT_PRIVATE and JS_EXPORT_PRIVATE respectively.

Source/JavaScriptCore:

* heap/WriteBarrierSupport.h:
* jit/ExecutableAllocator.cpp:
* jit/ExecutableAllocator.h:
* runtime/JSCPoison.h:
* runtime/JSCell.h:
* runtime/JSExportMacros.h:
* runtime/JSGlobalObject.h:
* runtime/JSObject.h:
* runtime/Options.h:
* runtime/PropertyDescriptor.h:
* runtime/PropertyMapHashTable.h:
* runtime/SamplingCounter.h:

Source/WTF:

* wtf/ExportMacros.h:
* wtf/Gigacage.h:
* wtf/HashTable.h:
* wtf/Threading.h:
* wtf/text/AtomicString.cpp:
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:

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

21 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/heap/WriteBarrierSupport.h
Source/JavaScriptCore/jit/ExecutableAllocator.cpp
Source/JavaScriptCore/jit/ExecutableAllocator.h
Source/JavaScriptCore/runtime/JSCPoison.h
Source/JavaScriptCore/runtime/JSCell.h
Source/JavaScriptCore/runtime/JSExportMacros.h
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/JavaScriptCore/runtime/JSObject.h
Source/JavaScriptCore/runtime/Options.h
Source/JavaScriptCore/runtime/PropertyDescriptor.h
Source/JavaScriptCore/runtime/PropertyMapHashTable.h
Source/JavaScriptCore/runtime/SamplingCounter.h
Source/WTF/ChangeLog
Source/WTF/wtf/ExportMacros.h
Source/WTF/wtf/Gigacage.h
Source/WTF/wtf/HashTable.h
Source/WTF/wtf/Threading.h
Source/WTF/wtf/text/AtomicString.cpp
Source/WTF/wtf/text/AtomicString.h
Source/WTF/wtf/text/StringImpl.h

index f652384..a128c23 100644 (file)
@@ -1,3 +1,26 @@
+2018-03-29  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        Remove WTF_EXPORTDATA and JS_EXPORTDATA
+        https://bugs.webkit.org/show_bug.cgi?id=184170
+
+        Reviewed by JF Bastien.
+
+        Replace WTF_EXPORTDATA and JS_EXPORTDATA with
+        WTF_EXPORT_PRIVATE and JS_EXPORT_PRIVATE respectively.
+
+        * heap/WriteBarrierSupport.h:
+        * jit/ExecutableAllocator.cpp:
+        * jit/ExecutableAllocator.h:
+        * runtime/JSCPoison.h:
+        * runtime/JSCell.h:
+        * runtime/JSExportMacros.h:
+        * runtime/JSGlobalObject.h:
+        * runtime/JSObject.h:
+        * runtime/Options.h:
+        * runtime/PropertyDescriptor.h:
+        * runtime/PropertyMapHashTable.h:
+        * runtime/SamplingCounter.h:
+
 2018-03-29  Ross Kirsling  <ross.kirsling@sony.com>
 
         MSVC __forceinline slows down JSC release build fivefold after r229391
index 570bba2..e323ec5 100644 (file)
@@ -80,8 +80,8 @@ public:
     }
 #else
     // These are necessary to work around not having conditional exports.
-    JS_EXPORTDATA static char usesWithBarrierFromCpp;
-    JS_EXPORTDATA static char usesWithoutBarrierFromCpp;
+    JS_EXPORT_PRIVATE static char usesWithBarrierFromCpp;
+    JS_EXPORT_PRIVATE static char usesWithoutBarrierFromCpp;
 #endif // ENABLE(WRITE_BARRIER_PROFILING)
 
     static void countWriteBarrier()
index d4aad60..9c43be8 100644 (file)
@@ -100,11 +100,11 @@ static const double executablePoolReservationFraction = 0.15;
 static const double executablePoolReservationFraction = 0.25;
 #endif
 
-JS_EXPORTDATA uintptr_t startOfFixedExecutableMemoryPool;
-JS_EXPORTDATA uintptr_t endOfFixedExecutableMemoryPool;
-JS_EXPORTDATA bool useFastPermisionsJITCopy { false };
+JS_EXPORT_PRIVATE uintptr_t startOfFixedExecutableMemoryPool;
+JS_EXPORT_PRIVATE uintptr_t endOfFixedExecutableMemoryPool;
+JS_EXPORT_PRIVATE bool useFastPermisionsJITCopy { false };
 
-JS_EXPORTDATA JITWriteSeparateHeapsFunction jitWriteSeparateHeapsFunction;
+JS_EXPORT_PRIVATE JITWriteSeparateHeapsFunction jitWriteSeparateHeapsFunction;
 
 #if !USE(EXECUTE_ONLY_JIT_WRITE_FUNCTION) && HAVE(REMAP_JIT)
 static uintptr_t startOfFixedWritableMemoryPool;
index 646956f..fff205e 100644 (file)
@@ -60,8 +60,8 @@ typedef WTF::MetaAllocatorHandle ExecutableMemoryHandle;
 
 #if ENABLE(ASSEMBLER)
 
-extern JS_EXPORTDATA uintptr_t startOfFixedExecutableMemoryPool;
-extern JS_EXPORTDATA uintptr_t endOfFixedExecutableMemoryPool;
+extern JS_EXPORT_PRIVATE uintptr_t startOfFixedExecutableMemoryPool;
+extern JS_EXPORT_PRIVATE uintptr_t endOfFixedExecutableMemoryPool;
 
 inline bool isJITPC(void* pc)
 {
@@ -70,9 +70,9 @@ inline bool isJITPC(void* pc)
 }
 
 typedef void (*JITWriteSeparateHeapsFunction)(off_t, const void*, size_t);
-extern JS_EXPORTDATA JITWriteSeparateHeapsFunction jitWriteSeparateHeapsFunction;
+extern JS_EXPORT_PRIVATE JITWriteSeparateHeapsFunction jitWriteSeparateHeapsFunction;
 
-extern JS_EXPORTDATA bool useFastPermisionsJITCopy;
+extern JS_EXPORT_PRIVATE bool useFastPermisionsJITCopy;
 
 static inline void* performJITMemcpy(void *dst, const void *src, size_t n)
 {
index 47f074d..a8f5171 100644 (file)
@@ -61,13 +61,13 @@ namespace JSC {
 #define POISON_KEY_NAME(_poisonID_) g_##_poisonID_##Poison
 
 #define DECLARE_POISON(_poisonID_) \
-    extern "C" JS_EXPORTDATA uintptr_t POISON_KEY_NAME(_poisonID_); \
+    extern "C" JS_EXPORT_PRIVATE uintptr_t POISON_KEY_NAME(_poisonID_); \
     using _poisonID_ ## Poison = Poison<POISON_KEY_NAME(_poisonID_)>;
 
 FOR_EACH_JSC_POISON(DECLARE_POISON)
 #undef DECLARE_POISON
 
-extern "C" JS_EXPORTDATA uintptr_t g_typedArrayPoisons[];
+extern "C" JS_EXPORT_PRIVATE uintptr_t g_typedArrayPoisons[];
 
 struct ClassInfo;
 
index de0aaa9..4796a31 100644 (file)
@@ -70,7 +70,7 @@ template<typename T> void* tryAllocateCell(Heap&, GCDeferralContext*, size_t = s
 
 #define DECLARE_EXPORT_INFO                                                  \
     protected:                                                               \
-        static JS_EXPORTDATA const ::JSC::ClassInfo s_info;                  \
+        static JS_EXPORT_PRIVATE const ::JSC::ClassInfo s_info;              \
     public:                                                                  \
         static constexpr const ::JSC::ClassInfo* info() { return &s_info; }
 
index 63ba63e..756d72a 100644 (file)
 #define JS_EXPORT_PRIVATE WTF_IMPORT
 #endif
 
-// FIXME: We should replace JS_EXPORTDATA with JS_EXPORT_PRIVATE.
-#define JS_EXPORTDATA JS_EXPORT_PRIVATE
-
 #else // !USE(EXPORT_MACROS)
 
-#define JS_EXPORTDATA
 #define JS_EXPORT_PRIVATE
 
 #endif // USE(EXPORT_MACROS)
index c6e297f..574c60b 100644 (file)
@@ -473,7 +473,7 @@ public:
     RuntimeFlags m_runtimeFlags;
     ConsoleClient* m_consoleClient { nullptr };
 
-    static JS_EXPORTDATA const GlobalObjectMethodTable s_globalObjectMethodTable;
+    static JS_EXPORT_PRIVATE const GlobalObjectMethodTable s_globalObjectMethodTable;
     const GlobalObjectMethodTable* m_globalObjectMethodTable;
 
     void createRareDataIfNeeded()
index 590ba1d..6c6598e 100644 (file)
@@ -71,14 +71,14 @@ struct HashTable;
 struct HashTableValue;
 
 JS_EXPORT_PRIVATE JSObject* throwTypeError(ExecState*, ThrowScope&, const String&);
-extern JS_EXPORTDATA const char* const NonExtensibleObjectPropertyDefineError;
-extern JS_EXPORTDATA const char* const ReadonlyPropertyWriteError;
-extern JS_EXPORTDATA const char* const ReadonlyPropertyChangeError;
-extern JS_EXPORTDATA const char* const UnableToDeletePropertyError;
-extern JS_EXPORTDATA const char* const UnconfigurablePropertyChangeAccessMechanismError;
-extern JS_EXPORTDATA const char* const UnconfigurablePropertyChangeConfigurabilityError;
-extern JS_EXPORTDATA const char* const UnconfigurablePropertyChangeEnumerabilityError;
-extern JS_EXPORTDATA const char* const UnconfigurablePropertyChangeWritabilityError;
+extern JS_EXPORT_PRIVATE const char* const NonExtensibleObjectPropertyDefineError;
+extern JS_EXPORT_PRIVATE const char* const ReadonlyPropertyWriteError;
+extern JS_EXPORT_PRIVATE const char* const ReadonlyPropertyChangeError;
+extern JS_EXPORT_PRIVATE const char* const UnableToDeletePropertyError;
+extern JS_EXPORT_PRIVATE const char* const UnconfigurablePropertyChangeAccessMechanismError;
+extern JS_EXPORT_PRIVATE const char* const UnconfigurablePropertyChangeConfigurabilityError;
+extern JS_EXPORT_PRIVATE const char* const UnconfigurablePropertyChangeEnumerabilityError;
+extern JS_EXPORT_PRIVATE const char* const UnconfigurablePropertyChangeWritabilityError;
 
 COMPILE_ASSERT(PropertyAttribute::None < FirstInternalAttribute, None_is_below_FirstInternalAttribute);
 COMPILE_ASSERT(PropertyAttribute::ReadOnly < FirstInternalAttribute, ReadOnly_is_below_FirstInternalAttribute);
index da356fa..72e9853 100644 (file)
@@ -638,7 +638,7 @@ private:
     static bool overrideAliasedOptionWithHeuristic(const char* name);
 
     // Declare the singleton instance of the options store:
-    JS_EXPORTDATA static Entry s_options[numberOfOptions];
+    JS_EXPORT_PRIVATE static Entry s_options[numberOfOptions];
     static Entry s_defaultOptions[numberOfOptions];
     static const EntryInfo s_optionsInfo[numberOfOptions];
 
index eb461d3..aeeae53 100644 (file)
@@ -82,7 +82,7 @@ public:
     unsigned attributesOverridingCurrent(const PropertyDescriptor& current) const;
 
 private:
-    JS_EXPORTDATA static unsigned defaultAttributes;
+    JS_EXPORT_PRIVATE static unsigned defaultAttributes;
     bool operator==(const PropertyDescriptor&) { return false; }
     enum { WritablePresent = 1, EnumerablePresent = 2, ConfigurablePresent = 4};
     // May be a getter/setter
index 7ad47b7..f7d1f73 100644 (file)
@@ -50,7 +50,7 @@ struct PropertyMapHashTableStats {
     std::atomic<unsigned> numReinserts;
 };
 
-JS_EXPORTDATA extern PropertyMapHashTableStats* propertyMapHashTableStats;
+JS_EXPORT_PRIVATE extern PropertyMapHashTableStats* propertyMapHashTableStats;
 
 #endif
 
index f7ad7d3..7928c4d 100644 (file)
@@ -73,7 +73,7 @@ protected:
     AbstractSamplingCounter** m_referer;
     // Null object used to detect end of static chain.
     static AbstractSamplingCounter s_abstractSamplingCounterChainEnd;
-    JS_EXPORTDATA static AbstractSamplingCounter* s_abstractSamplingCounterChain;
+    JS_EXPORT_PRIVATE static AbstractSamplingCounter* s_abstractSamplingCounterChain;
     static bool s_completed;
 };
 
index 3a2f577..10c433b 100644 (file)
@@ -1,3 +1,21 @@
+2018-03-29  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        Remove WTF_EXPORTDATA and JS_EXPORTDATA
+        https://bugs.webkit.org/show_bug.cgi?id=184170
+
+        Reviewed by JF Bastien.
+
+        Replace WTF_EXPORTDATA and JS_EXPORTDATA with
+        WTF_EXPORT_PRIVATE and JS_EXPORT_PRIVATE respectively.
+
+        * wtf/ExportMacros.h:
+        * wtf/Gigacage.h:
+        * wtf/HashTable.h:
+        * wtf/Threading.h:
+        * wtf/text/AtomicString.cpp:
+        * wtf/text/AtomicString.h:
+        * wtf/text/StringImpl.h:
+
 2018-03-29  Ross Kirsling  <ross.kirsling@sony.com>
 
         MSVC __forceinline slows down JSC release build fivefold after r229391
index de63594..eb2a725 100644 (file)
@@ -87,6 +87,3 @@
 #define WTF_EXPORT_PRIVATE
 
 #endif // USE(EXPORT_MACROS)
-
-// FIXME: We should replace WTF_EXPORTDATA and with WTF_EXPORT_PRIVATE.
-#define WTF_EXPORTDATA WTF_EXPORT_PRIVATE
index 1b484d6..6a772ff 100644 (file)
@@ -34,7 +34,7 @@
 #define GIGACAGE_BASE_PTRS_SIZE 8192
 
 extern "C" {
-extern WTF_EXPORTDATA char g_gigacageBasePtrs[GIGACAGE_BASE_PTRS_SIZE];
+extern WTF_EXPORT_PRIVATE char g_gigacageBasePtrs[GIGACAGE_BASE_PTRS_SIZE];
 }
 
 namespace Gigacage {
index d1eebd6..022e281 100644 (file)
@@ -59,15 +59,15 @@ namespace WTF {
 
     struct HashTableStats {
         // The following variables are all atomically incremented when modified.
-        WTF_EXPORTDATA static std::atomic<unsigned> numAccesses;
-        WTF_EXPORTDATA static std::atomic<unsigned> numRehashes;
-        WTF_EXPORTDATA static std::atomic<unsigned> numRemoves;
-        WTF_EXPORTDATA static std::atomic<unsigned> numReinserts;
+        WTF_EXPORT_PRIVATE static std::atomic<unsigned> numAccesses;
+        WTF_EXPORT_PRIVATE static std::atomic<unsigned> numRehashes;
+        WTF_EXPORT_PRIVATE static std::atomic<unsigned> numRemoves;
+        WTF_EXPORT_PRIVATE static std::atomic<unsigned> numReinserts;
 
         // The following variables are only modified in the recordCollisionAtCount method within a mutex.
-        WTF_EXPORTDATA static unsigned maxCollisions;
-        WTF_EXPORTDATA static unsigned numCollisions;
-        WTF_EXPORTDATA static unsigned collisionGraph[4096];
+        WTF_EXPORT_PRIVATE static unsigned maxCollisions;
+        WTF_EXPORT_PRIVATE static unsigned numCollisions;
+        WTF_EXPORT_PRIVATE static unsigned collisionGraph[4096];
 
         WTF_EXPORT_PRIVATE static void recordCollisionAtCount(unsigned count);
         WTF_EXPORT_PRIVATE static void dumpStats();
index 2cf08ca..97cbe54 100644 (file)
@@ -243,7 +243,7 @@ protected:
     // types don't use multiple-pass destruction.
 
 #if !HAVE(FAST_TLS)
-    static WTF_EXPORTDATA ThreadSpecificKey s_key;
+    static WTF_EXPORT_PRIVATE ThreadSpecificKey s_key;
     // One time initialization for this class as a whole.
     // This method must be called before initializeTLS() and it is not thread-safe.
     static void initializeTLSKey();
index b125742..1bcac90 100644 (file)
@@ -122,11 +122,11 @@ void AtomicString::show() const
 }
 #endif
 
-WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> nullAtomData;
-WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> emptyAtomData;
-WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> starAtomData;
-WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> xmlAtomData;
-WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> xmlnsAtomData;
+WTF_EXPORT_PRIVATE LazyNeverDestroyed<AtomicString> nullAtomData;
+WTF_EXPORT_PRIVATE LazyNeverDestroyed<AtomicString> emptyAtomData;
+WTF_EXPORT_PRIVATE LazyNeverDestroyed<AtomicString> starAtomData;
+WTF_EXPORT_PRIVATE LazyNeverDestroyed<AtomicString> xmlAtomData;
+WTF_EXPORT_PRIVATE LazyNeverDestroyed<AtomicString> xmlnsAtomData;
 
 void AtomicString::init()
 {
index 501946c..29357d0 100644 (file)
@@ -284,11 +284,11 @@ inline AtomicString::AtomicString(NSString* string)
 
 // Define external global variables for the commonly used atomic strings.
 // These are only usable from the main thread.
-extern WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> nullAtomData;
-extern WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> emptyAtomData;
-extern WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> starAtomData;
-extern WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> xmlAtomData;
-extern WTF_EXPORTDATA LazyNeverDestroyed<AtomicString> xmlnsAtomData;
+extern WTF_EXPORT_PRIVATE LazyNeverDestroyed<AtomicString> nullAtomData;
+extern WTF_EXPORT_PRIVATE LazyNeverDestroyed<AtomicString> emptyAtomData;
+extern WTF_EXPORT_PRIVATE LazyNeverDestroyed<AtomicString> starAtomData;
+extern WTF_EXPORT_PRIVATE LazyNeverDestroyed<AtomicString> xmlAtomData;
+extern WTF_EXPORT_PRIVATE LazyNeverDestroyed<AtomicString> xmlnsAtomData;
 
 inline const AtomicString& nullAtom() { return nullAtomData.get(); }
 inline const AtomicString& emptyAtom() { return emptyAtomData.get(); }
index 0a56874..53a2158 100644 (file)
@@ -358,7 +358,7 @@ public:
         operator StringImpl&();
     };
 
-    WTF_EXPORTDATA static StaticStringImpl s_atomicEmptyString;
+    WTF_EXPORT_PRIVATE static StaticStringImpl s_atomicEmptyString;
     ALWAYS_INLINE static StringImpl* empty() { return reinterpret_cast<StringImpl*>(&s_atomicEmptyString); }
 
     // FIXME: Does this really belong in StringImpl?
@@ -515,7 +515,7 @@ private:
     static const unsigned s_refCountIncrement = 0x2; // This allows us to ref / deref without disturbing the static string flag.
 
 #if STRING_STATS
-    WTF_EXPORTDATA static StringStats m_stringStats;
+    WTF_EXPORT_PRIVATE static StringStats m_stringStats;
 #endif
 
 public: