Tools/WebKitTestRunner/config.h

4949#define WEBKIT_EXPORTDATA
5050#endif
5151
52 #define WTF_EXPORT_PRIVATE JS_EXPORTDATA
53 #define JS_EXPORT_PRIVATE JS_EXPORTDATA
 52#define WTF_EXPORT_PRIVATE
 53#define JS_EXPORT_PRIVATE
5454
5555#endif /* USE(EXPORT_MACROS) */
5656
82513

Tools/WebKitAPITest/config.h

4949#define WEBKIT_EXPORTDATA
5050#endif
5151
52 #define WTF_EXPORT_PRIVATE JS_EXPORTDATA
53 #define JS_EXPORT_PRIVATE JS_EXPORTDATA
 52#define WTF_EXPORT_PRIVATE
 53#define JS_EXPORT_PRIVATE
5454
5555#endif /* USE(EXPORT_MACROS) */
5656
82513

Tools/DumpRenderTree/config.h

4848#define WEBKIT_EXPORTDATA
4949#endif
5050
51 #define WTF_EXPORT_PRIVATE JS_EXPORTDATA
52 #define JS_EXPORT_PRIVATE JS_EXPORTDATA
 51#define WTF_EXPORT_PRIVATE
 52#define JS_EXPORT_PRIVATE
5353
5454#endif /* USE(EXPORT_MACROS) */
5555
82513

Tools/ChangeLog

 12011-03-30 Kevin Ollivier <kevino@theolliviers.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Add export macros to all exported JSCore methods.
 6
 7 https://bugs.webkit.org/show_bug.cgi?id=27551
 8
 9 * DumpRenderTree/config.h:
 10 * WebKitAPITest/config.h:
 11 * WebKitTestRunner/config.h:
 12
1132011-03-30 Matthew Delaney <mdelaney@apple.com>
214
315 Reviewed by Chris Marrin.
82535

Source/JavaScriptCore/runtime/RegExp.h

3333 struct RegExpRepresentation;
3434 class JSGlobalData;
3535
36  RegExpFlags regExpFlags(const UString&);
 36 JS_EXPORT_PRIVATE RegExpFlags regExpFlags(const UString&);
3737
3838 class RegExp : public RefCounted<RegExp> {
3939 public:
40  static PassRefPtr<RegExp> create(JSGlobalData* globalData, const UString& pattern, RegExpFlags);
41  ~RegExp();
 40 JS_EXPORT_PRIVATE static PassRefPtr<RegExp> create(JSGlobalData*, const UString& pattern, RegExpFlags);
 41 JS_EXPORT_PRIVATE ~RegExp();
4242
4343 bool global() const { return m_flags & FlagGlobal; }
4444 bool ignoreCase() const { return m_flags & FlagIgnoreCase; }
82513

Source/JavaScriptCore/runtime/Structure.h

7373
7474 static void dumpStatistics();
7575
76  static PassRefPtr<Structure> addPropertyTransition(Structure*, const Identifier& propertyName, unsigned attributes, JSCell* specificValue, size_t& offset);
77  static PassRefPtr<Structure> addPropertyTransitionToExistingStructure(Structure*, const Identifier& propertyName, unsigned attributes, JSCell* specificValue, size_t& offset);
 76 JS_EXPORT_PRIVATE static PassRefPtr<Structure> addPropertyTransition(Structure*, const Identifier& propertyName, unsigned attributes, JSCell* specificValue, size_t& offset);
 77 JS_EXPORT_PRIVATE static PassRefPtr<Structure> addPropertyTransitionToExistingStructure(Structure*, const Identifier& propertyName, unsigned attributes, JSCell* specificValue, size_t& offset);
7878 static PassRefPtr<Structure> removePropertyTransition(Structure*, const Identifier& propertyName, size_t& offset);
79  static PassRefPtr<Structure> changePrototypeTransition(Structure*, JSValue prototype);
80  static PassRefPtr<Structure> despecifyFunctionTransition(Structure*, const Identifier&);
 79 JS_EXPORT_PRIVATE static PassRefPtr<Structure> changePrototypeTransition(Structure*, JSValue prototype);
 80 JS_EXPORT_PRIVATE static PassRefPtr<Structure> despecifyFunctionTransition(Structure*, const Identifier&);
8181 static PassRefPtr<Structure> getterSetterTransition(Structure*);
8282 static PassRefPtr<Structure> toCacheableDictionaryTransition(Structure*);
8383 static PassRefPtr<Structure> toUncacheableDictionaryTransition(Structure*);

9191
9292 PassRefPtr<Structure> flattenDictionaryStructure(JSGlobalData&, JSObject*);
9393
94  ~Structure();
 94 JS_EXPORT_PRIVATE ~Structure();
9595
9696 // These should be used with caution.
97  size_t addPropertyWithoutTransition(const Identifier& propertyName, unsigned attributes, JSCell* specificValue);
 97 JS_EXPORT_PRIVATE size_t addPropertyWithoutTransition(const Identifier& propertyName, unsigned attributes, JSCell* specificValue);
9898 size_t removePropertyWithoutTransition(const Identifier& propertyName);
9999 void setPrototypeWithoutTransition(JSValue prototype) { m_prototype = prototype; }
100100

117117 bool isUsingInlineStorage() const;
118118
119119 size_t get(const Identifier& propertyName);
120  size_t get(StringImpl* propertyName, unsigned& attributes, JSCell*& specificValue);
 120 JS_EXPORT_PRIVATE size_t get(StringImpl* propertyName, unsigned& attributes, JSCell*& specificValue);
121121 size_t get(const Identifier& propertyName, unsigned& attributes, JSCell*& specificValue)
122122 {
123123 ASSERT(!propertyName.isNull());

134134
135135 bool isEmpty() const { return m_propertyTable ? m_propertyTable->isEmpty() : m_offset == noOffset; }
136136
137  void despecifyDictionaryFunction(const Identifier& propertyName);
 137 JS_EXPORT_PRIVATE void despecifyDictionaryFunction(const Identifier& propertyName);
138138 void disableSpecificFunctionTracking() { m_specificFunctionThrashCount = maxSpecificFunctionThrashCount; }
139139
140140 void setEnumerationCache(JSGlobalData&, JSPropertyNameIterator* enumerationCache); // Defined in JSPropertyNameIterator.h.

162162 }
163163
164164 private:
165  Structure(JSValue prototype, const TypeInfo&, unsigned anonymousSlotCount, const ClassInfo*);
 165 JS_EXPORT_PRIVATE Structure(JSValue prototype, const TypeInfo&, unsigned anonymousSlotCount, const ClassInfo*);
166166 Structure(const Structure*);
167167
168168 static PassRefPtr<Structure> create(const Structure* structure)

187187 void despecifyAllFunctions();
188188
189189 PropertyTable* copyPropertyTable();
190  void materializePropertyMap();
 190 JS_EXPORT_PRIVATE void materializePropertyMap();
191191 void materializePropertyMapIfNecessary()
192192 {
193193 if (!m_propertyTable && m_previous)
82513

Source/JavaScriptCore/runtime/JSObject.h

7373 typedef WriteBarrierBase<Unknown>* PropertyStorage;
7474 typedef const WriteBarrierBase<Unknown>* ConstPropertyStorage;
7575
76  class JSObject : public JSCell {
 76 class JS_EXPORTDATA JSObject : public JSCell {
7777 friend class BatchedTransitionOptimizer;
7878 friend class JIT;
7979 friend class JSCell;
80  friend void setUpStaticFunctionSlot(ExecState* exec, const HashEntry* entry, JSObject* thisObj, const Identifier& propertyName, PropertySlot& slot);
 80 friend JS_EXPORT_PRIVATE void setUpStaticFunctionSlot(ExecState*, const HashEntry*, JSObject* thisObj, const Identifier& propertyName, PropertySlot&);
8181
8282 public:
8383 virtual void markChildren(MarkStack&);

247247
248248 static size_t offsetOfInlineStorage();
249249
250  static JS_EXPORTDATA const ClassInfo s_info;
 250 static const ClassInfo s_info;
251251
252252 protected:
253253 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
82513

Source/JavaScriptCore/runtime/ExceptionHelpers.h

4343 class Node;
4444 struct Instruction;
4545
46  JSObject* createInterruptedExecutionException(JSGlobalData*);
 46 JS_EXPORT_PRIVATE JSObject* createInterruptedExecutionException(JSGlobalData*);
4747 JSObject* createTerminatedExecutionException(JSGlobalData*);
48  JSObject* createStackOverflowError(ExecState*);
 48 JS_EXPORT_PRIVATE JSObject* createStackOverflowError(ExecState*);
4949 JSObject* createStackOverflowError(JSGlobalObject*);
5050 JSObject* createOutOfMemoryError(JSGlobalObject*);
5151 JSObject* createUndefinedVariableError(ExecState*, const Identifier&);
82513

Source/JavaScriptCore/runtime/RegExpObject.h

3030 public:
3131 typedef JSObjectWithGlobalObject Base;
3232
33  RegExpObject(JSGlobalObject* globalObject, NonNullPassRefPtr<Structure>, NonNullPassRefPtr<RegExp>);
 33 JS_EXPORT_PRIVATE RegExpObject(JSGlobalObject*, NonNullPassRefPtr<Structure>, NonNullPassRefPtr<RegExp>);
3434 virtual ~RegExpObject();
3535
3636 void setRegExp(PassRefPtr<RegExp> r) { d->regExp = r; }
82513

Source/JavaScriptCore/runtime/JSFunction.h

4545 typedef JSObjectWithGlobalObject Base;
4646
4747 public:
48  JSFunction(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, int length, const Identifier&, NativeFunction);
 48 JS_EXPORT_PRIVATE JSFunction(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, int length, const Identifier&, NativeFunction);
4949 JSFunction(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, int length, const Identifier&, NativeExecutable*);
5050 JSFunction(ExecState*, FunctionExecutable*, ScopeChainNode*);
5151 virtual ~JSFunction();
5252
53  const UString& name(ExecState*);
 53 JS_EXPORT_PRIVATE const UString& name(ExecState*);
5454 const UString displayName(ExecState*);
5555 const UString calculatedDisplayName(ExecState*);
5656

8989 private:
9090 JSFunction(NonNullPassRefPtr<Structure>, VPtrHackExecutable*);
9191
92  bool isHostFunctionNonInline() const;
 92 JS_EXPORT_PRIVATE bool isHostFunctionNonInline() const;
9393
9494 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
9595 virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
82513

Source/JavaScriptCore/runtime/ObjectPrototype.h

3636 bool m_hasNoPropertiesWithUInt32Names;
3737 };
3838
39  EncodedJSValue JSC_HOST_CALL objectProtoFuncToString(ExecState*);
 39 JS_EXPORT_PRIVATE EncodedJSValue JSC_HOST_CALL objectProtoFuncToString(ExecState*);
4040
4141} // namespace JSC
4242
82513

Source/JavaScriptCore/runtime/ArgList.h

144144 static void markLists(HeapRootMarker&, ListSet&);
145145
146146 private:
147  void slowAppend(JSValue);
 147 JS_EXPORT_PRIVATE void slowAppend(JSValue);
148148
149149 Register* m_buffer;
150150 size_t m_size;

234234 const_iterator begin() const { return m_args; }
235235 const_iterator end() const { return m_args + m_argCount; }
236236
237  void getSlice(int startIndex, ArgList& result) const;
 237 JS_EXPORT_PRIVATE void getSlice(int startIndex, ArgList& result) const;
238238 private:
239239 JSValue* m_args;
240240 size_t m_argCount;
82513

Source/JavaScriptCore/runtime/JSArray.h

5757
5858 enum ArrayCreationMode { CreateCompact, CreateInitialized };
5959
60  class JSArray : public JSNonFinalObject {
 60 class JS_EXPORTDATA JSArray : public JSNonFinalObject {
 61 friend class JIT;
6162 friend class Walker;
6263
6364 public:

7475 virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
7576 virtual void put(ExecState*, unsigned propertyName, JSValue); // FIXME: Make protected and add setItem.
7677
77  static JS_EXPORTDATA const ClassInfo s_info;
 78 static const ClassInfo s_info;
7879
7980 unsigned length() const { return m_storage->m_length; }
8081 void setLength(unsigned); // OK to use on new arrays, but not if it might be a RegExpMatchArray.
82513

Source/JavaScriptCore/runtime/InternalFunction.h

3131
3232 class FunctionPrototype;
3333
34  class InternalFunction : public JSObjectWithGlobalObject {
 34 class JS_EXPORTDATA InternalFunction : public JSObjectWithGlobalObject {
3535 public:
36  static JS_EXPORTDATA const ClassInfo s_info;
 36 static const ClassInfo s_info;
3737
3838 const UString& name(ExecState*);
3939 const UString displayName(ExecState*);
82513

Source/JavaScriptCore/runtime/Identifier.h

5353
5454 CString ascii() const { return m_string.ascii(); }
5555
56  static Identifier from(ExecState* exec, unsigned y);
57  static Identifier from(ExecState* exec, int y);
58  static Identifier from(ExecState* exec, double y);
 56 JS_EXPORT_PRIVATE static Identifier from(ExecState*, unsigned y);
 57 JS_EXPORT_PRIVATE static Identifier from(ExecState*, int y);
 58 JS_EXPORT_PRIVATE static Identifier from(ExecState*, double y);
5959 static Identifier from(JSGlobalData*, unsigned y);
6060 static Identifier from(JSGlobalData*, int y);
6161 static Identifier from(JSGlobalData*, double y);
6262
63  static uint32_t toUInt32(const UString&, bool& ok);
64  uint32_t toUInt32(bool& ok) const { return toUInt32(m_string, ok); }
 63 JS_EXPORT_PRIVATE static uint32_t toUInt32(const UString&, bool& ok);
 64 JS_EXPORT_PRIVATE uint32_t toUInt32(bool& ok) const { return toUInt32(m_string, ok); }
6565 unsigned toArrayIndex(bool& ok) const;
6666
6767 bool isNull() const { return m_string.isNull(); }

7373 friend bool operator==(const Identifier&, const char*);
7474 friend bool operator!=(const Identifier&, const char*);
7575
76  static bool equal(const StringImpl*, const char*);
77  static bool equal(const StringImpl*, const UChar*, unsigned length);
78  static bool equal(const StringImpl* a, const StringImpl* b) { return ::equal(a, b); }
 76 JS_EXPORT_PRIVATE static bool equal(const StringImpl*, const char*);
 77 JS_EXPORT_PRIVATE static bool equal(const StringImpl*, const UChar*, unsigned length);
 78 JS_EXPORT_PRIVATE static bool equal(const StringImpl* a, const StringImpl* b) { return ::equal(a, b); }
7979
80  static PassRefPtr<StringImpl> add(ExecState*, const char*); // Only to be used with string literals.
81  static PassRefPtr<StringImpl> add(JSGlobalData*, const char*); // Only to be used with string literals.
 80 JS_EXPORT_PRIVATE static PassRefPtr<StringImpl> add(ExecState*, const char*); // Only to be used with string literals.
 81 JS_EXPORT_PRIVATE static PassRefPtr<StringImpl> add(JSGlobalData*, const char*); // Only to be used with string literals.
8282
8383 private:
8484 UString m_string;

108108 return addSlowCase(globalData, r);
109109 }
110110
111  static PassRefPtr<StringImpl> addSlowCase(ExecState*, StringImpl* r);
112  static PassRefPtr<StringImpl> addSlowCase(JSGlobalData*, StringImpl* r);
 111 JS_EXPORT_PRIVATE static PassRefPtr<StringImpl> addSlowCase(ExecState*, StringImpl*);
 112 static PassRefPtr<StringImpl> addSlowCase(JSGlobalData*, StringImpl*);
113113
114  static void checkCurrentIdentifierTable(ExecState*);
 114 JS_EXPORT_PRIVATE static void checkCurrentIdentifierTable(ExecState*);
115115 static void checkCurrentIdentifierTable(JSGlobalData*);
116116 };
117117
82513

Source/JavaScriptCore/runtime/StringObject.h

2626
2727namespace JSC {
2828
29  class StringObject : public JSWrapperObject {
 29 class JS_EXPORTDATA StringObject : public JSWrapperObject {
3030 public:
3131 StringObject(ExecState*, NonNullPassRefPtr<Structure>);
3232 StringObject(ExecState*, NonNullPassRefPtr<Structure>, const UString&);

4141 virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
4242 virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
4343
44  static const JS_EXPORTDATA ClassInfo s_info;
 44 static const ClassInfo s_info;
4545
4646 JSString* internalValue() const { return asString(JSWrapperObject::internalValue());}
4747
82513

Source/JavaScriptCore/runtime/JSByteArray.h

7575 setIndex(i, byteValue);
7676 }
7777
78  JSByteArray(ExecState*, NonNullPassRefPtr<Structure>, WTF::ByteArray* storage);
79  static PassRefPtr<Structure> createStructure(JSGlobalData&, JSValue prototype, const JSC::ClassInfo* = &s_defaultInfo);
 78 JS_EXPORT_PRIVATE JSByteArray(ExecState*, NonNullPassRefPtr<Structure>, WTF::ByteArray* storage);
 79 JS_EXPORT_PRIVATE static PassRefPtr<Structure> createStructure(JSGlobalData&, JSValue prototype, const JSC::ClassInfo* = &s_defaultInfo);
8080
8181 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
8282 virtual bool getOwnPropertySlot(JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
82513

Source/JavaScriptCore/runtime/Lookup.h

140140 createTable(&exec->globalData());
141141 }
142142
143  void deleteTable() const;
 143 JS_EXPORT_PRIVATE void deleteTable() const;
144144
145145 // Find an entry in the table, and return the entry.
146146 ALWAYS_INLINE const HashEntry* entry(JSGlobalData* globalData, const Identifier& identifier) const

175175 }
176176
177177 // Convert the hash table keys to identifiers.
178  void createTable(JSGlobalData*) const;
 178 JS_EXPORT_PRIVATE void createTable(JSGlobalData*) const;
179179 };
180180
181  void setUpStaticFunctionSlot(ExecState*, const HashEntry*, JSObject* thisObject, const Identifier& propertyName, PropertySlot&);
 181 JS_EXPORT_PRIVATE void setUpStaticFunctionSlot(ExecState*, const HashEntry*, JSObject* thisObject, const Identifier& propertyName, PropertySlot&);
182182
183183 /**
184184 * This method does it all (looking in the hashtable, checking for function
82513

Source/JavaScriptCore/runtime/JSVariableObject.h

4040
4141 class Register;
4242
43  class JSVariableObject : public JSNonFinalObject {
 43 class JS_EXPORT_PRIVATE JSVariableObject : public JSNonFinalObject {
4444 friend class JIT;
4545
4646 public:
82513

Source/JavaScriptCore/runtime/Completion.h

5555 JSValue m_value;
5656 };
5757
58  Completion checkSyntax(ExecState*, const SourceCode&);
59  Completion evaluate(ExecState*, ScopeChainNode*, const SourceCode&, JSValue thisValue = JSValue());
 58 JS_EXPORT_PRIVATE Completion checkSyntax(ExecState*, const SourceCode&);
 59 JS_EXPORT_PRIVATE Completion evaluate(ExecState*, ScopeChainNode*, const SourceCode&, JSValue thisValue = JSValue());
6060
6161} // namespace JSC
6262
82513

Source/JavaScriptCore/runtime/JSCell.h

7171 friend class StructureChain;
7272
7373 private:
74  explicit JSCell(Structure*);
75  virtual ~JSCell();
 74 JS_EXPORT_PRIVATE explicit JSCell(Structure*);
 75 JS_EXPORT_PRIVATE virtual ~JSCell();
7676
7777 public:
7878 static PassRefPtr<Structure> createDummyStructure(JSGlobalData& globalData)

8181 }
8282
8383 // Querying the type.
84  bool isString() const;
85  bool isObject() const;
86  virtual bool isGetterSetter() const;
 84 JS_EXPORT_PRIVATE bool isString() const;
 85 JS_EXPORT_PRIVATE bool isObject() const;
 86 JS_EXPORT_PRIVATE virtual bool isGetterSetter() const;
8787 bool inherits(const ClassInfo*) const;
8888 virtual bool isAPIValueWrapper() const { return false; }
8989 virtual bool isPropertyNameIterator() const { return false; }

9191 Structure* structure() const;
9292
9393 // Extracting the value.
94  bool getString(ExecState* exec, UString&) const;
95  UString getString(ExecState* exec) const; // null string if not a string
96  JSObject* getObject(); // NULL if not an object
97  const JSObject* getObject() const; // NULL if not an object
 94 JS_EXPORT_PRIVATE bool getString(ExecState* exec, UString&) const;
 95 JS_EXPORT_PRIVATE UString getString(ExecState* exec) const; // null string if not a string
 96 JS_EXPORT_PRIVATE JSObject* getObject(); // 0 if not an object
 97 JS_EXPORT_PRIVATE const JSObject* getObject() const; // 0 if not an object
9898
99  virtual CallType getCallData(CallData&);
100  virtual ConstructType getConstructData(ConstructData&);
 99 JS_EXPORT_PRIVATE virtual CallType getCallData(CallData&);
 100 JS_EXPORT_PRIVATE virtual ConstructType getConstructData(ConstructData&);
101101
102102 // Extracting integer values.
103103 // FIXME: remove these methods, can check isNumberCell in JSValue && then call asNumberCell::*.
104  virtual bool getUInt32(uint32_t&) const;
 104 JS_EXPORT_PRIVATE virtual bool getUInt32(uint32_t&) const;
105105
106106 // Basic conversions.
107  virtual JSValue toPrimitive(ExecState*, PreferredPrimitiveType) const;
108  virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue&);
109  virtual bool toBoolean(ExecState*) const;
110  virtual double toNumber(ExecState*) const;
111  virtual UString toString(ExecState*) const;
112  virtual JSObject* toObject(ExecState*, JSGlobalObject*) const;
 107 JS_EXPORT_PRIVATE virtual JSValue toPrimitive(ExecState*, PreferredPrimitiveType) const;
 108 JS_EXPORT_PRIVATE virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue&);
 109 JS_EXPORT_PRIVATE virtual bool toBoolean(ExecState*) const;
 110 JS_EXPORT_PRIVATE virtual double toNumber(ExecState*) const;
 111 JS_EXPORT_PRIVATE virtual UString toString(ExecState*) const;
 112 JS_EXPORT_PRIVATE virtual JSObject* toObject(ExecState*, JSGlobalObject*) const;
113113
114114 // Garbage collection.
115115 void* operator new(size_t, ExecState*);

122122#endif
123123
124124 // Object operations, with the toObject operation included.
125  const ClassInfo* classInfo() const { return m_structure->classInfo(); }
126  virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
127  virtual void put(ExecState*, unsigned propertyName, JSValue);
128  virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
129  virtual bool deleteProperty(ExecState*, unsigned propertyName);
 125 JS_EXPORT_PRIVATE const ClassInfo* classInfo() const { return m_structure->classInfo(); }
 126 JS_EXPORT_PRIVATE virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
 127 JS_EXPORT_PRIVATE virtual void put(ExecState*, unsigned propertyName, JSValue);
 128 JS_EXPORT_PRIVATE virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
 129 JS_EXPORT_PRIVATE virtual bool deleteProperty(ExecState*, unsigned propertyName);
130130
131  virtual JSObject* toThisObject(ExecState*) const;
132  virtual JSValue getJSNumber();
133  void* vptr() { return *reinterpret_cast<void**>(this); }
134  void setVPtr(void* vptr) { *reinterpret_cast<void**>(this) = vptr; }
 131 JS_EXPORT_PRIVATE virtual JSObject* toThisObject(ExecState*) const;
 132 JS_EXPORT_PRIVATE virtual JSValue getJSNumber();
 133 JS_EXPORT_PRIVATE void* vptr() { return *reinterpret_cast<void**>(this); }
 134 JS_EXPORT_PRIVATE void setVPtr(void* vptr) { *reinterpret_cast<void**>(this) = vptr; }
135135
136136 // FIXME: Rename getOwnPropertySlot to virtualGetOwnPropertySlot, and
137137 // fastGetOwnPropertySlot to getOwnPropertySlot. Callers should always

154154
155155 private:
156156 // Base implementation; for non-object classes implements getPropertySlot.
157  virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
158  virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&);
 157 JS_EXPORT_PRIVATE virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
 158 JS_EXPORT_PRIVATE virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&);
159159
160160 Structure* m_structure;
161161 };

174174 return m_structure->typeInfo().type() == ObjectType;
175175 }
176176
177  inline bool JSCell::isString() const
 177 JS_EXPORT_PRIVATE inline bool JSCell::isString() const
178178 {
179179 return m_structure->typeInfo().type() == StringType;
180180 }
82513

Source/JavaScriptCore/runtime/JSLock.h

5656 class JSLock {
5757 WTF_MAKE_NONCOPYABLE(JSLock);
5858 public:
59  JSLock(ExecState*);
 59 JS_EXPORT_PRIVATE JSLock(ExecState*);
6060 JSLock(JSGlobalData*);
6161
6262 JSLock(JSLockBehavior lockBehavior)

8080 unlock(m_lockBehavior);
8181 }
8282
83  static void lock(JSLockBehavior);
84  static void unlock(JSLockBehavior);
 83 JS_EXPORT_PRIVATE static void lock(JSLockBehavior);
 84 JS_EXPORT_PRIVATE static void unlock(JSLockBehavior);
8585 static void lock(ExecState*);
8686 static void unlock(ExecState*);
8787
88  static intptr_t lockCount();
89  static bool currentThreadIsHoldingLock();
 88 JS_EXPORT_PRIVATE static intptr_t lockCount();
 89 JS_EXPORT_PRIVATE static bool currentThreadIsHoldingLock();
9090
9191 JSLockBehavior m_lockBehavior;
9292

9494 WTF_MAKE_NONCOPYABLE(DropAllLocks);
9595 public:
9696 DropAllLocks(ExecState* exec);
97  DropAllLocks(JSLockBehavior);
98  ~DropAllLocks();
 97 JS_EXPORT_PRIVATE DropAllLocks(JSLockBehavior);
 98 JS_EXPORT_PRIVATE ~DropAllLocks();
9999
100100 private:
101101 intptr_t m_lockCount;
82513

Source/JavaScriptCore/runtime/PropertySlot.h

220220 return m_getValue;
221221 }
222222 private:
223  JSValue functionGetter(ExecState*) const;
 223 JS_EXPORT_PRIVATE JSValue functionGetter(ExecState*) const;
224224
225225 GetValueFunc m_getValue;
226226 GetIndexValueFunc m_getIndexValue;
82513

Source/JavaScriptCore/runtime/FunctionConstructor.h

3636 virtual CallType getCallData(CallData&);
3737 };
3838
39  JSObject* constructFunction(ExecState*, JSGlobalObject*, const ArgList&, const Identifier& functionName, const UString& sourceURL, int lineNumber);
 39 JS_EXPORT_PRIVATE JSObject* constructFunction(ExecState*, JSGlobalObject*, const ArgList&, const Identifier& functionName, const UString& sourceURL, int lineNumber);
4040 JSObject* constructFunction(ExecState*, JSGlobalObject*, const ArgList&);
4141
4242} // namespace JSC
82513

Source/JavaScriptCore/runtime/SmallStrings.h

7373 private:
7474 static const unsigned singleCharacterStringCount = maxSingleCharacterString + 1;
7575
76  void createEmptyString(JSGlobalData*);
77  void createSingleCharacterString(JSGlobalData*, unsigned char);
 76 JS_EXPORT_PRIVATE void createEmptyString(JSGlobalData*);
 77 JS_EXPORT_PRIVATE void createSingleCharacterString(JSGlobalData*, unsigned char);
7878
7979 JSString* m_emptyString;
8080 JSString* m_singleCharacterStrings[singleCharacterStringCount];
82513

Source/JavaScriptCore/runtime/PropertyNameArray.h

6868
6969 JSGlobalData* globalData() { return m_globalData; }
7070
71  void add(const Identifier& identifier) { add(identifier.impl()); }
72  void add(StringImpl*);
 71 JS_EXPORT_PRIVATE void add(const Identifier& identifier) { add(identifier.impl()); }
 72 JS_EXPORT_PRIVATE void add(StringImpl*);
7373 void addKnownUnique(StringImpl* identifier) { m_data->propertyNameVector().append(Identifier(m_globalData, identifier)); }
7474
7575 Identifier& operator[](unsigned i) { return m_data->propertyNameVector()[i]; }
82513

Source/JavaScriptCore/runtime/Error.h

4545 JSObject* createTypeError(JSGlobalObject*, const UString&);
4646 JSObject* createURIError(JSGlobalObject*, const UString&);
4747 // ExecState wrappers.
48  JSObject* createError(ExecState*, const UString&);
 48 JS_EXPORT_PRIVATE JSObject* createError(ExecState*, const UString&);
4949 JSObject* createEvalError(ExecState*, const UString&);
50  JSObject* createRangeError(ExecState*, const UString&);
51  JSObject* createReferenceError(ExecState*, const UString&);
52  JSObject* createSyntaxError(ExecState*, const UString&);
53  JSObject* createTypeError(ExecState*, const UString&);
 50 JS_EXPORT_PRIVATE JSObject* createRangeError(ExecState*, const UString&);
 51 JS_EXPORT_PRIVATE JSObject* createReferenceError(ExecState*, const UString&);
 52 JS_EXPORT_PRIVATE JSObject* createSyntaxError(ExecState*, const UString&);
 53 JS_EXPORT_PRIVATE JSObject* createTypeError(ExecState*, const UString&);
5454 JSObject* createURIError(ExecState*, const UString&);
5555
5656 // Methods to add

6060 JSObject* addErrorInfo(ExecState*, JSObject* error, int line, const SourceCode&);
6161
6262 // Methods to throw Errors.
63  JSValue throwError(ExecState*, JSValue);
64  JSObject* throwError(ExecState*, JSObject*);
 63 JS_EXPORT_PRIVATE JSValue throwError(ExecState*, JSValue);
 64 JS_EXPORT_PRIVATE JSObject* throwError(ExecState*, JSObject*);
6565
6666 // Convenience wrappers, create an throw an exception with a default message.
67  JSObject* throwTypeError(ExecState*);
68  JSObject* throwSyntaxError(ExecState*);
 67 JS_EXPORT_PRIVATE JSObject* throwTypeError(ExecState*);
 68 JS_EXPORT_PRIVATE JSObject* throwSyntaxError(ExecState*);
6969
7070 // Convenience wrappers, wrap result as an EncodedJSValue.
7171 inline EncodedJSValue throwVMError(ExecState* exec, JSValue error) { return JSValue::encode(throwError(exec, error)); }
82513

Source/JavaScriptCore/runtime/UString.h

3030class UString {
3131public:
3232 // Construct a null string, distinguishable from an empty string.
33  UString() { }
 33 JS_EXPORT_PRIVATE UString() { }
3434
3535 // Construct a string with UTF-16 data.
36  UString(const UChar* characters, unsigned length);
 36 JS_EXPORT_PRIVATE UString(const UChar* characters, unsigned length);
3737
3838 // Construct a string with UTF-16 data, from a null-terminated source.
39  UString(const UChar*);
 39 JS_EXPORT_PRIVATE UString(const UChar*);
4040
4141 // Construct a string with latin1 data.
42  UString(const char* characters, unsigned length);
 42 JS_EXPORT_PRIVATE UString(const char* characters, unsigned length);
4343
4444 // Construct a string with latin1 data, from a null-terminated source.
45  UString(const char* characters);
 45 JS_EXPORT_PRIVATE UString(const char* characters);
4646
4747 // Construct a string referencing an existing StringImpl.
48  UString(StringImpl* impl) : m_impl(impl) { }
49  UString(PassRefPtr<StringImpl> impl) : m_impl(impl) { }
50  UString(RefPtr<StringImpl> impl) : m_impl(impl) { }
 48 JS_EXPORT_PRIVATE UString(StringImpl* impl) : m_impl(impl) { }
 49 JS_EXPORT_PRIVATE UString(PassRefPtr<StringImpl> impl) : m_impl(impl) { }
 50 JS_EXPORT_PRIVATE UString(RefPtr<StringImpl> impl) : m_impl(impl) { }
5151
5252 // Inline the destructor.
5353 ALWAYS_INLINE ~UString() { }

7676 return m_impl->characters();
7777 }
7878
79  CString ascii() const;
80  CString latin1() const;
81  CString utf8(bool strict = false) const;
 79 JS_EXPORT_PRIVATE CString ascii() const;
 80 JS_EXPORT_PRIVATE CString latin1() const;
 81 JS_EXPORT_PRIVATE CString utf8(bool strict = false) const;
8282
8383 UChar operator[](unsigned index) const
8484 {

8787 return m_impl->characters()[index];
8888 }
8989
90  static UString number(int);
91  static UString number(unsigned);
92  static UString number(long);
93  static UString number(long long);
94  static UString number(double);
 90 JS_EXPORT_PRIVATE static UString number(int);
 91 JS_EXPORT_PRIVATE static UString number(unsigned);
 92 JS_EXPORT_PRIVATE static UString number(long);
 93 JS_EXPORT_PRIVATE static UString number(long long);
 94 JS_EXPORT_PRIVATE static UString number(double);
9595
9696 // Find a single character or string, also with match function & latin1 forms.
9797 size_t find(UChar c, unsigned start = 0) const

107107 size_t reverseFind(const UString& str, unsigned start = UINT_MAX) const
108108 { return m_impl ? m_impl->reverseFind(str.impl(), start) : notFound; }
109109
110  UString substringSharingImpl(unsigned pos, unsigned len = UINT_MAX) const;
 110 JS_EXPORT_PRIVATE UString substringSharingImpl(unsigned pos, unsigned len = UINT_MAX) const;
111111
112112private:
113113 RefPtr<StringImpl> m_impl;
82513

Source/JavaScriptCore/runtime/DateInstance.h

3131
3232 class DateInstance : public JSWrapperObject {
3333 public:
34  DateInstance(ExecState*, NonNullPassRefPtr<Structure>, double);
35  explicit DateInstance(ExecState*, NonNullPassRefPtr<Structure>);
 34 JS_EXPORT_PRIVATE DateInstance(ExecState*, NonNullPassRefPtr<Structure>, double);
 35 JS_EXPORT_PRIVATE explicit DateInstance(ExecState*, NonNullPassRefPtr<Structure>);
3636
3737 double internalNumber() const { return internalValue().uncheckedGetNumber(); }
3838
82513

Source/JavaScriptCore/runtime/RopeImpl.h

8383 {
8484 }
8585
86  void destructNonRecursive();
 86 JS_EXPORT_PRIVATE void destructNonRecursive();
8787 void derefFibersNonRecursive(Vector<RopeImpl*, 32>& workQueue);
8888
8989 bool hasOneRef() { return (m_refCountAndFlags & s_refCountMask) == s_refCountIncrement; }
82513

Source/JavaScriptCore/runtime/JSGlobalData.h

113113 // the original API.
114114 enum GlobalDataType { Default, APIContextGroup, APIShared };
115115
116  struct ClientData {
 116 struct JS_EXPORT_PRIVATE ClientData {
117117 virtual ~ClientData() = 0;
118118 };
119119

122122 static bool sharedInstanceExists();
123123 static JSGlobalData& sharedInstance();
124124
125  static PassRefPtr<JSGlobalData> create(ThreadStackType);
126  static PassRefPtr<JSGlobalData> createLeaked(ThreadStackType);
 125 JS_EXPORT_PRIVATE static PassRefPtr<JSGlobalData> create(ThreadStackType);
 126 JS_EXPORT_PRIVATE static PassRefPtr<JSGlobalData> createLeaked(ThreadStackType);
127127 static PassRefPtr<JSGlobalData> createContextGroup(ThreadStackType);
128  ~JSGlobalData();
 128 JS_EXPORT_PRIVATE ~JSGlobalData();
129129
130130#if ENABLE(JSC_MULTIPLE_THREADS)
131131 // Will start tracking threads that use the heap, which is resource-heavy.

249249
250250 void resetDateCache();
251251
252  void startSampling();
253  void stopSampling();
254  void dumpSampleData(ExecState* exec);
 252 JS_EXPORT_PRIVATE void startSampling();
 253 JS_EXPORT_PRIVATE void stopSampling();
 254 JS_EXPORT_PRIVATE void dumpSampleData(ExecState*);
255255 void recompileAllJSFunctions();
256256 RegExpCache* regExpCache() { return m_regExpCache; }
257257#if ENABLE(REGEXP_TRACING)
82513

Source/JavaScriptCore/runtime/TimeoutChecker.h

5757 --m_startCount;
5858 }
5959
60  void reset();
 60 JS_EXPORT_PRIVATE void reset();
6161
62  bool didTimeOut(ExecState*);
 62 JS_EXPORT_PRIVATE bool didTimeOut(ExecState*);
6363
6464 private:
6565 unsigned m_timeoutInterval;
82513

Source/JavaScriptCore/runtime/Heap.h

6363
6464 Heap(JSGlobalData*);
6565 ~Heap();
66  void destroy(); // JSGlobalData must call destroy() before ~Heap().
 66 JS_EXPORT_PRIVATE void destroy(); // JSGlobalData must call destroy() before ~Heap().
6767
6868 JSGlobalData* globalData() const { return m_globalData; }
6969 MarkedSpace& markedSpace() { return m_markedSpace; }
7070 MachineThreads& machineThreads() { return m_machineThreads; }
7171
72  GCActivityCallback* activityCallback();
 72 JS_EXPORT_PRIVATE GCActivityCallback* activityCallback();
7373 void setActivityCallback(PassOwnPtr<GCActivityCallback>);
7474
75  bool isBusy(); // true if an allocation or collection is in progress
76  void* allocate(size_t);
77  void collectAllGarbage();
 75 JS_EXPORT_PRIVATE bool isBusy(); // true if an allocation or collection is in progress
 76 JS_EXPORT_PRIVATE void* allocate(size_t);
 77 JS_EXPORT_PRIVATE void collectAllGarbage();
7878
79  void reportExtraMemoryCost(size_t cost);
 79 JS_EXPORT_PRIVATE void reportExtraMemoryCost(size_t cost);
8080
81  void protect(JSValue);
82  bool unprotect(JSValue); // True when the protect count drops to 0.
 81 JS_EXPORT_PRIVATE void protect(JSValue);
 82 JS_EXPORT_PRIVATE bool unprotect(JSValue); // True when the protect count drops to 0.
8383
8484 bool contains(void*);
8585
86  size_t size() const;
87  size_t capacity() const;
 86 JS_EXPORT_PRIVATE size_t size() const;
 87 JS_EXPORT_PRIVATE size_t capacity() const;
8888 size_t objectCount() const;
8989 size_t globalObjectCount();
9090 size_t protectedObjectCount();

110110 static const size_t minExtraCost = 256;
111111 static const size_t maxExtraCost = 1024 * 1024;
112112
113  void* allocateSlowCase(size_t);
114  void reportExtraMemoryCostSlowCase(size_t);
 113 JS_EXPORT_PRIVATE void* allocateSlowCase(size_t);
 114 JS_EXPORT_PRIVATE void reportExtraMemoryCostSlowCase(size_t);
115115
116116 void markRoots();
117117 void markProtectedObjects(HeapRootMarker&);
82513

Source/JavaScriptCore/runtime/JSGlobalObject.h

5353
5454 typedef Vector<ExecState*, 16> ExecStateStack;
5555
56  class JSGlobalObject : public JSVariableObject {
 56 class JS_EXPORT_PRIVATE JSGlobalObject : public JSVariableObject {
5757 protected:
5858 typedef HashSet<RefPtr<OpaqueJSWeakObjectMap> > WeakMapSet;
5959

435435 class DynamicGlobalObjectScope {
436436 WTF_MAKE_NONCOPYABLE(DynamicGlobalObjectScope);
437437 public:
438  DynamicGlobalObjectScope(JSGlobalData&, JSGlobalObject*);
 438 JS_EXPORT_PRIVATE DynamicGlobalObjectScope(JSGlobalData&, JSGlobalObject*);
439439
440440 ~DynamicGlobalObjectScope()
441441 {
82513

Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h

3939 return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
4040 }
4141
42  JSGlobalObject* globalObject() const;
 42 JS_EXPORT_PRIVATE JSGlobalObject* globalObject() const;
4343
4444protected:
45  JSObjectWithGlobalObject(JSGlobalObject*, NonNullPassRefPtr<Structure>);
 45 JS_EXPORT_PRIVATE JSObjectWithGlobalObject(JSGlobalObject*, NonNullPassRefPtr<Structure>);
4646
4747 JSObjectWithGlobalObject(NonNullPassRefPtr<Structure> structure)
4848 : JSNonFinalObject(structure)
82513

Source/JavaScriptCore/runtime/JSValue.h

8181#endif
8282 };
8383
84  double nonInlineNaN();
 84 JS_EXPORT_PRIVATE double nonInlineNaN();
8585
8686 // This implements ToInt32, defined in ECMA-262 9.5.
87  int32_t toInt32(double);
 87 JS_EXPORT_PRIVATE int32_t toInt32(double);
8888
8989 // This implements ToUInt32, defined in ECMA-262 9.6.
9090 inline uint32_t toUInt32(double number)

193193 JSObject* toObject(ExecState*, JSGlobalObject*) const;
194194
195195 // Integer conversions.
196  double toInteger(ExecState*) const;
 196 JS_EXPORT_PRIVATE double toInteger(ExecState*) const;
197197 double toIntegerPreserveNaN(ExecState*) const;
198198 int32_t toInt32(ExecState*) const;
199199 uint32_t toUInt32(ExecState*) const;

232232
233233 bool isCell() const;
234234 JSCell* asCell() const;
235  bool isValidCallee();
 235 JS_EXPORT_PRIVATE bool isValidCallee();
236236
237237#ifndef NDEBUG
238238 char* description();

246246 JSValue(HashTableDeletedValueTag);
247247
248248 inline const JSValue asValue() const { return *this; }
249  JSObject* toObjectSlowCase(ExecState*, JSGlobalObject*) const;
250  JSObject* toThisObjectSlowCase(ExecState*) const;
 249 JS_EXPORT_PRIVATE JSObject* toObjectSlowCase(ExecState*, JSGlobalObject*) const;
 250 JS_EXPORT_PRIVATE JSObject* toThisObjectSlowCase(ExecState*) const;
251251
252  JSObject* synthesizePrototype(ExecState*) const;
 252 JS_EXPORT_PRIVATE JSObject* synthesizePrototype(ExecState*) const;
253253 JSObject* synthesizeObject(ExecState*) const;
254254
255255#if USE(JSVALUE32_64)
82513

Source/JavaScriptCore/runtime/PropertyDescriptor.h

4646 JSValue value() const { return m_value; }
4747 JSValue getter() const;
4848 JSValue setter() const;
49  void setUndefined();
50  void setDescriptor(JSValue value, unsigned attributes);
 49 JS_EXPORT_PRIVATE void setUndefined();
 50 JS_EXPORT_PRIVATE void setDescriptor(JSValue, unsigned attributes);
5151 void setAccessorDescriptor(JSValue getter, JSValue setter, unsigned attributes);
5252 void setWritable(bool);
5353 void setEnumerable(bool);
82513

Source/JavaScriptCore/runtime/JSWrapperObject.h

2828
2929 // This class is used as a base for classes such as String,
3030 // Number, Boolean and Date which are wrappers for primitive types.
31  class JSWrapperObject : public JSNonFinalObject {
 31 class JS_EXPORT_PRIVATE JSWrapperObject : public JSNonFinalObject {
3232 protected:
3333 explicit JSWrapperObject(NonNullPassRefPtr<Structure>);
3434
82513

Source/JavaScriptCore/runtime/CallData.h

5757 } js;
5858 };
5959
60  JSValue call(ExecState*, JSValue functionObject, CallType, const CallData&, JSValue thisValue, const ArgList&);
 60 JS_EXPORT_PRIVATE JSValue call(ExecState*, JSValue functionObject, CallType, const CallData&, JSValue thisValue, const ArgList&);
6161
6262} // namespace JSC
6363
82513

Source/JavaScriptCore/runtime/ScopeChain.h

3232 class MarkStack;
3333 class ScopeChainIterator;
3434
35  class ScopeChainNode : public JSCell {
 35 class JS_EXPORT_PRIVATE ScopeChainNode : public JSCell {
3636 public:
3737 ScopeChainNode(ScopeChainNode* next, JSObject* object, JSGlobalData* globalData, JSGlobalObject* globalObject, JSObject* globalThis)
3838 : JSCell(globalData->scopeChainNodeStructure.get())
82513

Source/JavaScriptCore/runtime/ConstructData.h

5757 } js;
5858 };
5959
60  JSObject* construct(ExecState*, JSValue constructor, ConstructType, const ConstructData&, const ArgList&);
 60 JS_EXPORT_PRIVATE JSObject* construct(ExecState*, JSValue constructor, ConstructType, const ConstructData&, const ArgList&);
6161
6262} // namespace JSC
6363
82513

Source/JavaScriptCore/runtime/MarkedSpace.h

105105 void freeBlocks(DoublyLinkedList<MarkedBlock>&);
106106
107107 SizeClass& sizeClassFor(size_t);
108  void* allocateFromSizeClass(SizeClass&);
 108 JS_EXPORT_PRIVATE void* allocateFromSizeClass(SizeClass&);
109109
110110 void clearMarks(MarkedBlock*);
111111
82513

Source/JavaScriptCore/runtime/InitializeThreading.h

3333
3434 // This function must be called from the main thread. It is safe to call it repeatedly.
3535 // Darwin is an exception to this rule: it is OK to call this function from any thread, even reentrantly.
36  void initializeThreading();
 36 JS_EXPORT_PRIVATE void initializeThreading();
3737
3838}
3939
82513

Source/JavaScriptCore/config.h

5959#define JS_EXPORTCLASS
6060#endif
6161
62 #define WTF_EXPORT_PRIVATE JS_EXPORTDATA
63 #define JS_EXPORT_PRIVATE JS_EXPORTDATA
 62#define WTF_EXPORT_PRIVATE
 63#define JS_EXPORT_PRIVATE
6464
6565#endif /* USE(EXPORT_MACROS) */
6666
82513

Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h

8989 typedef DeclarationStacks::VarStack VarStack;
9090 typedef DeclarationStacks::FunctionStack FunctionStack;
9191
92  static void setDumpsGeneratedCode(bool dumpsGeneratedCode);
 92 JS_EXPORT_PRIVATE static void setDumpsGeneratedCode(bool);
9393 static bool dumpsGeneratedCode();
9494
9595 BytecodeGenerator(ProgramNode*, ScopeChainNode*, SymbolTable*, ProgramCodeBlock*);
82513

Source/JavaScriptCore/wtf/RefCountedLeakCounter.h

2626
2727namespace WTF {
2828
29  struct RefCountedLeakCounter {
 29 struct WTF_EXPORT_PRIVATE RefCountedLeakCounter {
3030 static void suppressMessages(const char*);
3131 static void cancelMessageSuppression(const char*);
3232
82513

Source/JavaScriptCore/wtf/NullPtr.h

4242#else
4343
4444namespace std {
45  class nullptr_t { };
 45class WTF_EXPORT_PRIVATE nullptr_t { };
4646}
4747
48 extern std::nullptr_t nullptr;
 48extern WTF_EXPORT_PRIVATE std::nullptr_t nullptr;
4949
5050#endif
5151
82513

Source/JavaScriptCore/wtf/Threading.h

8484// This function must be called from the main thread. It is safe to call it repeatedly.
8585// Darwin is an exception to this rule: it is OK to call it from any thread, the only
8686// requirement is that the calls are not reentrant.
87 void initializeThreading();
 87WTF_EXPORT_PRIVATE void initializeThreading();
8888
8989// Returns 0 if thread creation failed.
9090// The thread name must be a literal since on some platforms it's passed in to the thread.
91 ThreadIdentifier createThread(ThreadFunction, void*, const char* threadName);
 91WTF_EXPORT_PRIVATE ThreadIdentifier createThread(ThreadFunction, void*, const char* threadName);
9292
9393// Internal platform-specific createThread implementation.
94 ThreadIdentifier createThreadInternal(ThreadFunction, void*, const char* threadName);
 94WTF_EXPORT_PRIVATE ThreadIdentifier createThreadInternal(ThreadFunction, void*, const char* threadName);
9595
9696// Called in the thread during initialization.
9797// Helpful for platforms where the thread name must be set from within the thread.
9898void initializeCurrentThreadInternal(const char* threadName);
9999
100 ThreadIdentifier currentThread();
101 int waitForThreadCompletion(ThreadIdentifier, void**);
102 void detachThread(ThreadIdentifier);
 100WTF_EXPORT_PRIVATE ThreadIdentifier currentThread();
 101WTF_EXPORT_PRIVATE int waitForThreadCompletion(ThreadIdentifier, void**);
 102WTF_EXPORT_PRIVATE void detachThread(ThreadIdentifier);
103103
104 void yield();
 104WTF_EXPORT_PRIVATE void yield();
105105
106 void lockAtomicallyInitializedStaticMutex();
107 void unlockAtomicallyInitializedStaticMutex();
 106WTF_EXPORT_PRIVATE void lockAtomicallyInitializedStaticMutex();
 107WTF_EXPORT_PRIVATE void unlockAtomicallyInitializedStaticMutex();
108108
109109} // namespace WTF
110110
82513

Source/JavaScriptCore/wtf/MainThread.h

3838typedef void MainThreadFunction(void*);
3939
4040// Must be called from the main thread.
41 void initializeMainThread();
 41WTF_EXPORT_PRIVATE void initializeMainThread();
4242
43 void callOnMainThread(MainThreadFunction*, void* context);
 43WTF_EXPORT_PRIVATE void callOnMainThread(MainThreadFunction*, void* context);
4444void callOnMainThreadAndWait(MainThreadFunction*, void* context);
4545void cancelCallOnMainThread(MainThreadFunction*, void* context);
4646
47 void setMainThreadCallbacksPaused(bool paused);
 47WTF_EXPORT_PRIVATE void setMainThreadCallbacksPaused(bool);
4848
49 bool isMainThread();
 49WTF_EXPORT_PRIVATE bool isMainThread();
5050
5151// NOTE: these functions are internal to the callOnMainThread implementation.
5252void initializeMainThreadPlatform();
82513

Source/JavaScriptCore/wtf/OSAllocator.h

4646 // releaseDecommitted should be called on a region of VM allocated by a single reservation,
4747 // the memory must all currently be in a decommitted state.
4848 static void* reserveUncommitted(size_t, Usage = UnknownUsage, bool writable = true, bool executable = false);
49  static void releaseDecommitted(void*, size_t);
 49 WTF_EXPORT_PRIVATE static void releaseDecommitted(void*, size_t);
5050
5151 // These methods are symmetric; they commit or decommit a region of VM (uncommitted VM should
5252 // never be accessed, since the OS may not have attached physical memory for these regions).

5757 // These methods are symmetric; reserveAndCommit allocates VM in an committed state,
5858 // decommitAndRelease should be called on a region of VM allocated by a single reservation,
5959 // the memory must all currently be in a committed state.
60  static void* reserveAndCommit(size_t, Usage = UnknownUsage, bool writable = true, bool executable = false);
 60 WTF_EXPORT_PRIVATE static void* reserveAndCommit(size_t, Usage = UnknownUsage, bool writable = true, bool executable = false);
6161 static void decommitAndRelease(void* base, size_t size);
6262
6363 // These methods are akin to reserveAndCommit/decommitAndRelease, above - however rather than
82513

Source/JavaScriptCore/wtf/FastMalloc.h

2929namespace WTF {
3030
3131 // These functions call CRASH() if an allocation fails.
32  void* fastMalloc(size_t);
33  void* fastZeroedMalloc(size_t);
34  void* fastCalloc(size_t numElements, size_t elementSize);
35  void* fastRealloc(void*, size_t);
36  char* fastStrDup(const char*);
37  size_t fastMallocSize(const void*);
 32 WTF_EXPORT_PRIVATE void* fastMalloc(size_t);
 33 WTF_EXPORT_PRIVATE void* fastZeroedMalloc(size_t);
 34 WTF_EXPORT_PRIVATE void* fastCalloc(size_t numElements, size_t elementSize);
 35 WTF_EXPORT_PRIVATE void* fastRealloc(void*, size_t);
 36 WTF_EXPORT_PRIVATE char* fastStrDup(const char*);
 37 WTF_EXPORT_PRIVATE size_t fastMallocSize(const void*);
3838
3939 struct TryMallocReturnValue {
4040 TryMallocReturnValue(void* data)

6868 return returnValue;
6969 }
7070
71  TryMallocReturnValue tryFastMalloc(size_t n);
72  TryMallocReturnValue tryFastZeroedMalloc(size_t n);
73  TryMallocReturnValue tryFastCalloc(size_t n_elements, size_t element_size);
74  TryMallocReturnValue tryFastRealloc(void* p, size_t n);
 71 WTF_EXPORT_PRIVATE TryMallocReturnValue tryFastMalloc(size_t n);
 72 WTF_EXPORT_PRIVATE TryMallocReturnValue tryFastZeroedMalloc(size_t n);
 73 WTF_EXPORT_PRIVATE TryMallocReturnValue tryFastCalloc(size_t n_elements, size_t element_size);
 74 WTF_EXPORT_PRIVATE TryMallocReturnValue tryFastRealloc(void* p, size_t n);
7575
76  void fastFree(void*);
 76 WTF_EXPORT_PRIVATE void fastFree(void*);
7777
7878#ifndef NDEBUG
7979 void fastMallocForbid();
82513

Source/JavaScriptCore/wtf/ThreadSpecific.h

216216// 2) We do not need to hold many instances of ThreadSpecific<> data. This fixed number should be far enough.
217217const int kMaxTlsKeySize = 256;
218218
219 long& tlsKeyCount();
220 DWORD* tlsKeys();
 219WTF_EXPORT_PRIVATE long& tlsKeyCount();
 220WTF_EXPORT_PRIVATE DWORD* tlsKeys();
221221
222222template<typename T>
223223inline ThreadSpecific<T>::ThreadSpecific()
82513

Source/JavaScriptCore/wtf/WTFThreadData.h

8989class WTFThreadData {
9090 WTF_MAKE_NONCOPYABLE(WTFThreadData);
9191public:
92  WTFThreadData();
93  ~WTFThreadData();
 92 WTF_EXPORT_PRIVATE WTFThreadData();
 93 WTF_EXPORT_PRIVATE ~WTFThreadData();
9494
9595 AtomicStringTable* atomicStringTable()
9696 {
82513

Source/JavaScriptCore/wtf/DateMath.h

5959
6060// Not really math related, but this is currently the only shared place to put these.
6161double parseES5DateFromNullTerminatedCharacters(const char* dateString);
62 double parseDateFromNullTerminatedCharacters(const char* dateString);
 62WTF_EXPORT_PRIVATE double parseDateFromNullTerminatedCharacters(const char* dateString);
6363double timeClip(double);
6464
6565inline double jsCurrentTime()

8282const double msPerMonth = 2592000000.0;
8383
8484// Returns the number of days from 1970-01-01 to the specified date.
85 double dateToDaysFrom1970(int year, int month, int day);
86 int msToYear(double ms);
87 int dayInYear(double ms, int year);
88 int monthFromDayInYear(int dayInYear, bool leapYear);
89 int dayInMonthFromDayInYear(int dayInYear, bool leapYear);
 85WTF_EXPORT_PRIVATE double dateToDaysFrom1970(int year, int month, int day);
 86WTF_EXPORT_PRIVATE int msToYear(double ms);
 87WTF_EXPORT_PRIVATE int dayInYear(double ms, int year);
 88WTF_EXPORT_PRIVATE int monthFromDayInYear(int dayInYear, bool leapYear);
 89WTF_EXPORT_PRIVATE int dayInMonthFromDayInYear(int dayInYear, bool leapYear);
9090
9191// Returns offset milliseconds for UTC and DST.
92 int32_t calculateUTCOffset();
93 double calculateDSTOffset(double ms, double utcOffset);
 92WTF_EXPORT_PRIVATE int32_t calculateUTCOffset();
 93WTF_EXPORT_PRIVATE double calculateDSTOffset(double ms, double utcOffset);
9494
9595} // namespace WTF
9696
82513

Source/JavaScriptCore/wtf/unicode/Collator.h

4545 public:
4646 enum Result { Equal = 0, Greater = 1, Less = -1 };
4747
48  Collator(const char* locale); // Parsing is lenient; e.g. language identifiers (such as "en-US") are accepted, too.
49  ~Collator();
50  void setOrderLowerFirst(bool);
 48 WTF_EXPORT_PRIVATE Collator(const char* locale); // Parsing is lenient; e.g. language identifiers (such as "en-US") are accepted, too.
 49 WTF_EXPORT_PRIVATE ~Collator();
 50 WTF_EXPORT_PRIVATE void setOrderLowerFirst(bool);
5151
5252 static PassOwnPtr<Collator> userDefault();
5353
54  Result collate(const ::UChar*, size_t, const ::UChar*, size_t) const;
 54 WTF_EXPORT_PRIVATE Result collate(const ::UChar*, size_t, const ::UChar*, size_t) const;
5555
5656 private:
5757#if USE(ICU_UNICODE) && !UCONFIG_NO_COLLATION
82513

Source/JavaScriptCore/wtf/unicode/UTF8.h

6262 // to the replacement character; otherwise (when the flag is set to strict)
6363 // they constitute an error.
6464
65  ConversionResult convertUTF8ToUTF16(
 65 WTF_EXPORT_PRIVATE ConversionResult convertUTF8ToUTF16(
6666 const char** sourceStart, const char* sourceEnd,
6767 UChar** targetStart, UChar* targetEnd, bool strict = true);
6868
69  ConversionResult convertUTF16ToUTF8(
 69 WTF_EXPORT_PRIVATE ConversionResult convertUTF16ToUTF8(
7070 const UChar** sourceStart, const UChar* sourceEnd,
7171 char** targetStart, char* targetEnd, bool strict = true);
7272
82513

Source/JavaScriptCore/wtf/CurrentTime.h

3939// Returns the current UTC time in seconds, counted from January 1, 1970.
4040// Precision varies depending on platform but is usually as good or better
4141// than a millisecond.
42 double currentTime();
 42WTF_EXPORT_PRIVATE double currentTime();
4343
4444// Same thing, in milliseconds.
4545inline double currentTimeMS()
82513

Source/JavaScriptCore/wtf/DecimalNumber.h

8181 ASSERT(m_significand[0] != '0' || !m_exponent);
8282 }
8383
84  unsigned bufferLengthForStringDecimal() const;
 84 WTF_EXPORT_PRIVATE unsigned bufferLengthForStringDecimal() const;
8585 unsigned bufferLengthForStringExponential() const;
8686
87  unsigned toStringDecimal(UChar* buffer, unsigned bufferLength) const;
 87 WTF_EXPORT_PRIVATE unsigned toStringDecimal(UChar* buffer, unsigned bufferLength) const;
8888 unsigned toStringExponential(UChar* buffer, unsigned bufferLength) const;
8989
9090 bool sign() const { return m_sign; }
82513

Source/JavaScriptCore/wtf/MD5.h

3535
3636namespace WTF {
3737
38 class MD5 {
 38class WTF_EXPORT_PRIVATE MD5 {
3939public:
4040 MD5();
4141
82513

Source/JavaScriptCore/wtf/dtoa.h

3030
3131// s00: input string. Must not be 0 and must be terminated by 0.
3232// se: *se will have the last consumed character position + 1.
33 double strtod(const char* s00, char** se);
 33WTF_EXPORT_PRIVATE double strtod(const char* s00, char** se);
3434
3535typedef char DtoaBuffer[80];
3636
37 void dtoa(DtoaBuffer result, double dd, bool& sign, int& exponent, unsigned& precision);
 37WTF_EXPORT_PRIVATE void dtoa(DtoaBuffer result, double dd, bool& sign, int& exponent, unsigned& precision);
3838void dtoaRoundSF(DtoaBuffer result, double dd, int ndigits, bool& sign, int& exponent, unsigned& precision);
3939void dtoaRoundDP(DtoaBuffer result, double dd, int ndigits, bool& sign, int& exponent, unsigned& precision);
4040
4141// Size = 80 for sizeof(DtoaBuffer) + some sign bits, decimal point, 'e', exponent digits.
4242const unsigned NumberToStringBufferLength = 96;
4343typedef UChar NumberToStringBuffer[NumberToStringBufferLength];
44 unsigned numberToString(double, NumberToStringBuffer);
 44WTF_EXPORT_PRIVATE unsigned numberToString(double, NumberToStringBuffer);
4545
4646} // namespace WTF
4747
82513

Source/JavaScriptCore/wtf/NullPtr.cpp

2424
2525*/
2626
 27#include "config.h"
2728#include "NullPtr.h"
2829
2930#include "Platform.h"
82513

Source/JavaScriptCore/wtf/CryptographicallyRandomNumber.h

3232
3333#if USE(OS_RANDOMNESS)
3434uint32_t cryptographicallyRandomNumber();
35 void cryptographicallyRandomValues(void* buffer, size_t length);
 35WTF_EXPORT_PRIVATE void cryptographicallyRandomValues(void* buffer, size_t length);
3636#endif
3737
3838}
82513

Source/JavaScriptCore/wtf/ThreadingPrimitives.h

100100class Mutex {
101101 WTF_MAKE_NONCOPYABLE(Mutex); WTF_MAKE_FAST_ALLOCATED;
102102public:
103  Mutex();
104  ~Mutex();
 103 WTF_EXPORT_PRIVATE Mutex();
 104 WTF_EXPORT_PRIVATE ~Mutex();
105105
106  void lock();
107  bool tryLock();
108  void unlock();
 106 WTF_EXPORT_PRIVATE void lock();
 107 WTF_EXPORT_PRIVATE bool tryLock();
 108 WTF_EXPORT_PRIVATE void unlock();
109109
110110public:
111111 PlatformMutex& impl() { return m_mutex; }

136136class ThreadCondition {
137137 WTF_MAKE_NONCOPYABLE(ThreadCondition);
138138public:
139  ThreadCondition();
140  ~ThreadCondition();
 139 WTF_EXPORT_PRIVATE ThreadCondition();
 140 WTF_EXPORT_PRIVATE ~ThreadCondition();
141141
142  void wait(Mutex& mutex);
 142 WTF_EXPORT_PRIVATE void wait(Mutex&);
143143 // Returns true if the condition was signaled before absoluteTime, false if the absoluteTime was reached or is in the past.
144144 // The absoluteTime is in seconds, starting on January 1, 1970. The time is assumed to use the same time zone as WTF::currentTime().
145  bool timedWait(Mutex&, double absoluteTime);
146  void signal();
147  void broadcast();
 145 WTF_EXPORT_PRIVATE bool timedWait(Mutex&, double absoluteTime);
 146 WTF_EXPORT_PRIVATE void signal();
 147 WTF_EXPORT_PRIVATE void broadcast();
148148
149149private:
150150 PlatformCondition m_condition;
82513

Source/JavaScriptCore/wtf/RandomNumber.h

3030
3131 // Returns a pseudo-random number in the range [0, 1), attempts to be
3232 // cryptographically secure if possible on the target platform
33  double randomNumber();
 33 WTF_EXPORT_PRIVATE double randomNumber();
3434
3535}
3636
82513

Source/JavaScriptCore/wtf/text/AtomicString.h

3838
3939class AtomicString {
4040public:
41  static void init();
 41 WTF_EXPORT_PRIVATE static void init();
4242
43  AtomicString() { }
44  AtomicString(const char* s) : m_string(add(s)) { }
 43 WTF_EXPORT_PRIVATE AtomicString() { }
 44 // copy constructor needs to be explicitly defined so we can specify proper dll linkage
 45 WTF_EXPORT_PRIVATE AtomicString(const AtomicString& s) : m_string(s.m_string) { }
 46 WTF_EXPORT_PRIVATE AtomicString(const char* s) : m_string(add(s)) { }
4547 AtomicString(const UChar* s, unsigned length) : m_string(add(s, length)) { }
4648 AtomicString(const UChar* s, unsigned length, unsigned existingHash) : m_string(add(s, length, existingHash)) { }
4749 AtomicString(const UChar* s) : m_string(add(s)) { }
4850 ATOMICSTRING_CONVERSION AtomicString(StringImpl* imp) : m_string(add(imp)) { }
4951 AtomicString(AtomicStringImpl* imp) : m_string(imp) { }
50  ATOMICSTRING_CONVERSION AtomicString(const String& s) : m_string(add(s.impl())) { }
 52 WTF_EXPORT_PRIVATE ATOMICSTRING_CONVERSION AtomicString(const String& s) : m_string(add(s.impl())) { }
5153
5254 // Hash table deleted values, which are only constructed and never copied or destroyed.
53  AtomicString(WTF::HashTableDeletedValueType) : m_string(WTF::HashTableDeletedValue) { }
54  bool isHashTableDeletedValue() const { return m_string.isHashTableDeletedValue(); }
 55 WTF_EXPORT_PRIVATE AtomicString(WTF::HashTableDeletedValueType) : m_string(WTF::HashTableDeletedValue) { }
 56 WTF_EXPORT_PRIVATE bool isHashTableDeletedValue() const { return m_string.isHashTableDeletedValue(); }
5557
56  static AtomicStringImpl* find(const UChar* s, unsigned length, unsigned existingHash);
 58 WTF_EXPORT_PRIVATE ~AtomicString() { }
5759
 60 WTF_EXPORT_PRIVATE static AtomicStringImpl* find(const UChar*, unsigned length, unsigned existingHash);
 61
5862 operator const String&() const { return m_string; }
5963 const String& string() const { return m_string; };
6064
61  AtomicStringImpl* impl() const { return static_cast<AtomicStringImpl *>(m_string.impl()); }
 65 WTF_EXPORT_PRIVATE AtomicStringImpl* impl() const { return static_cast<AtomicStringImpl *>(m_string.impl()); }
6266
6367 const UChar* characters() const { return m_string.characters(); }
6468 unsigned length() const { return m_string.length(); }

8286 bool endsWith(const String& s, bool caseSensitive = true) const
8387 { return m_string.endsWith(s, caseSensitive); }
8488
85  AtomicString lower() const;
 89 WTF_EXPORT_PRIVATE AtomicString lower() const;
8690 AtomicString upper() const { return AtomicString(impl()->upper()); }
8791
8892 int toInt(bool* ok = 0) const { return m_string.toInt(ok); }

110114
111115 // AtomicString::fromUTF8 will return a null string if
112116 // the input data contains invalid UTF-8 sequences.
113  static AtomicString fromUTF8(const char*, size_t);
114  static AtomicString fromUTF8(const char*);
 117 WTF_EXPORT_PRIVATE static AtomicString fromUTF8(const char*, size_t);
 118 WTF_EXPORT_PRIVATE static AtomicString fromUTF8(const char*);
115119
116120private:
117121 String m_string;
118122
119  static PassRefPtr<StringImpl> add(const char*);
120  static PassRefPtr<StringImpl> add(const UChar*, unsigned length);
 123 WTF_EXPORT_PRIVATE static PassRefPtr<StringImpl> add(const char*);
 124 WTF_EXPORT_PRIVATE static PassRefPtr<StringImpl> add(const UChar*, unsigned length);
121125 static PassRefPtr<StringImpl> add(const UChar*, unsigned length, unsigned existingHash);
122126 static PassRefPtr<StringImpl> add(const UChar*);
123127 ALWAYS_INLINE PassRefPtr<StringImpl> add(StringImpl* r)

126130 return r;
127131 return addSlowCase(r);
128132 }
129  static PassRefPtr<StringImpl> addSlowCase(StringImpl*);
 133 WTF_EXPORT_PRIVATE static PassRefPtr<StringImpl> addSlowCase(StringImpl*);
130134};
131135
132136inline bool operator==(const AtomicString& a, const AtomicString& b) { return a.impl() == b.impl(); }
133 bool operator==(const AtomicString& a, const char* b);
134 bool operator==(const AtomicString& a, const Vector<UChar>& b);
 137WTF_EXPORT_PRIVATE bool operator==(const AtomicString&, const char*);
 138WTF_EXPORT_PRIVATE bool operator==(const AtomicString&, const Vector<UChar>&);
135139inline bool operator==(const AtomicString& a, const String& b) { return equal(a.impl(), b.impl()); }
136140inline bool operator==(const char* a, const AtomicString& b) { return b == a; }
137141inline bool operator==(const String& a, const AtomicString& b) { return equal(a.impl(), b.impl()); }
82513

Source/JavaScriptCore/wtf/text/CString.h

5252class CString {
5353public:
5454 CString() { }
55  CString(const char*);
56  CString(const char*, size_t length);
 55 WTF_EXPORT_PRIVATE CString(const char*);
 56 WTF_EXPORT_PRIVATE CString(const char*, size_t length);
5757 CString(CStringBuffer* buffer) : m_buffer(buffer) { }
58  static CString newUninitialized(size_t length, char*& characterBuffer);
 58 WTF_EXPORT_PRIVATE static CString newUninitialized(size_t length, char*& characterBuffer);
5959
6060 const char* data() const
6161 {

7777 RefPtr<CStringBuffer> m_buffer;
7878};
7979
80 bool operator==(const CString& a, const CString& b);
 80WTF_EXPORT_PRIVATE bool operator==(const CString& a, const CString& b);
8181inline bool operator!=(const CString& a, const CString& b) { return !(a == b); }
8282
8383} // namespace WTF
82513

Source/JavaScriptCore/wtf/text/StringBuilder.h

3838 {
3939 }
4040
41  void append(const UChar*, unsigned);
42  void append(const char*, unsigned);
 41 WTF_EXPORT_PRIVATE void append(const UChar*, unsigned);
 42 WTF_EXPORT_PRIVATE void append(const char*, unsigned);
4343
4444 void append(const String& string)
4545 {

9999
100100 bool isEmpty() const { return !length(); }
101101
102  void reserveCapacity(unsigned newCapacity);
 102 WTF_EXPORT_PRIVATE void reserveCapacity(unsigned newCapacity);
103103
104  void resize(unsigned newSize);
 104 WTF_EXPORT_PRIVATE void resize(unsigned newSize);
105105
106  void shrinkToFit();
 106 WTF_EXPORT_PRIVATE void shrinkToFit();
107107
108108 UChar operator[](unsigned i) const
109109 {

124124private:
125125 void allocateBuffer(const UChar* currentCharacters, unsigned requiredLength);
126126 UChar* appendUninitialized(unsigned length);
127  void reifyString();
 127 WTF_EXPORT_PRIVATE void reifyString();
128128
129129 unsigned m_length;
130130 String m_string;
82513

Source/JavaScriptCore/wtf/text/WTFString.h

6767
6868bool charactersAreAllASCII(const UChar*, size_t);
6969bool charactersAreAllLatin1(const UChar*, size_t);
70 int charactersToIntStrict(const UChar*, size_t, bool* ok = 0, int base = 10);
71 unsigned charactersToUIntStrict(const UChar*, size_t, bool* ok = 0, int base = 10);
 70WTF_EXPORT_PRIVATE int charactersToIntStrict(const UChar*, size_t, bool* ok = 0, int base = 10);
 71WTF_EXPORT_PRIVATE unsigned charactersToUIntStrict(const UChar*, size_t, bool* ok = 0, int base = 10);
7272int64_t charactersToInt64Strict(const UChar*, size_t, bool* ok = 0, int base = 10);
7373uint64_t charactersToUInt64Strict(const UChar*, size_t, bool* ok = 0, int base = 10);
7474intptr_t charactersToIntPtrStrict(const UChar*, size_t, bool* ok = 0, int base = 10);

7979uint64_t charactersToUInt64(const UChar*, size_t, bool* ok = 0); // ignores trailing garbage
8080intptr_t charactersToIntPtr(const UChar*, size_t, bool* ok = 0); // ignores trailing garbage
8181
82 double charactersToDouble(const UChar*, size_t, bool* ok = 0, bool* didReadNumber = 0);
 82WTF_EXPORT_PRIVATE double charactersToDouble(const UChar*, size_t, bool* ok = 0, bool* didReadNumber = 0);
8383float charactersToFloat(const UChar*, size_t, bool* ok = 0, bool* didReadNumber = 0);
8484
8585template<bool isSpecialCharacter(UChar)> bool isAllSpecialCharacters(const UChar*, size_t);

8787class String {
8888public:
8989 // Construct a null string, distinguishable from an empty string.
90  String() { }
 90 WTF_EXPORT_PRIVATE String() { }
9191
9292 // Construct a string with UTF-16 data.
93  String(const UChar* characters, unsigned length);
 93 WTF_EXPORT_PRIVATE String(const UChar* characters, unsigned length);
9494
9595 // Construct a string by copying the contents of a vector. To avoid
9696 // copying, consider using String::adopt instead.

9898 explicit String(const Vector<UChar, inlineCapacity>&);
9999
100100 // Construct a string with UTF-16 data, from a null-terminated source.
101  String(const UChar*);
 101 WTF_EXPORT_PRIVATE String(const UChar*);
102102
103103 // Construct a string with latin1 data.
104  String(const char* characters, unsigned length);
 104 WTF_EXPORT_PRIVATE String(const char* characters, unsigned length);
105105
106106 // Construct a string with latin1 data, from a null-terminated source.
107  String(const char* characters);
 107 WTF_EXPORT_PRIVATE String(const char* characters);
108108
109109 // Construct a string referencing an existing StringImpl.
110  String(StringImpl* impl) : m_impl(impl) { }
111  String(PassRefPtr<StringImpl> impl) : m_impl(impl) { }
112  String(RefPtr<StringImpl> impl) : m_impl(impl) { }
 110 WTF_EXPORT_PRIVATE String(StringImpl* impl) : m_impl(impl) { }
 111 WTF_EXPORT_PRIVATE String(PassRefPtr<StringImpl> impl) : m_impl(impl) { }
 112 WTF_EXPORT_PRIVATE String(RefPtr<StringImpl> impl) : m_impl(impl) { }
113113
114114 // Inline the destructor.
115115 ALWAYS_INLINE ~String() { }

139139 return m_impl->characters();
140140 }
141141
142  CString ascii() const;
143  CString latin1() const;
144  CString utf8(bool strict = false) const;
 142 WTF_EXPORT_PRIVATE CString ascii() const;
 143 WTF_EXPORT_PRIVATE CString latin1() const;
 144 WTF_EXPORT_PRIVATE CString utf8(bool strict = false) const;
145145
146146 UChar operator[](unsigned index) const
147147 {

150150 return m_impl->characters()[index];
151151 }
152152
153  static String number(short);
154  static String number(unsigned short);
155  static String number(int);
156  static String number(unsigned);
157  static String number(long);
158  static String number(unsigned long);
159  static String number(long long);
160  static String number(unsigned long long);
161  static String number(double);
 153 WTF_EXPORT_PRIVATE static String number(short);
 154 WTF_EXPORT_PRIVATE static String number(unsigned short);
 155 WTF_EXPORT_PRIVATE static String number(int);
 156 WTF_EXPORT_PRIVATE static String number(unsigned);
 157 WTF_EXPORT_PRIVATE static String number(long);
 158 WTF_EXPORT_PRIVATE static String number(unsigned long);
 159 WTF_EXPORT_PRIVATE static String number(long long);
 160 WTF_EXPORT_PRIVATE static String number(unsigned long long);
 161 WTF_EXPORT_PRIVATE static String number(double);
162162
163163 // Find a single character or string, also with match function & latin1 forms.
164164 size_t find(UChar c, unsigned start = 0) const

177177 { return m_impl ? m_impl->reverseFind(str.impl(), start) : notFound; }
178178
179179 // Case insensitive string matching.
180  size_t findIgnoringCase(const char* str, unsigned start = 0) const
 180 WTF_EXPORT_PRIVATE size_t findIgnoringCase(const char* str, unsigned start = 0) const
181181 { return m_impl ? m_impl->findIgnoringCase(str, start) : notFound; }
182  size_t findIgnoringCase(const String& str, unsigned start = 0) const
 182 WTF_EXPORT_PRIVATE size_t findIgnoringCase(const String& str, unsigned start = 0) const
183183 { return m_impl ? m_impl->findIgnoringCase(str.impl(), start) : notFound; }
184184 size_t reverseFindIgnoringCase(const String& str, unsigned start = UINT_MAX) const
185185 { return m_impl ? m_impl->reverseFindIgnoringCase(str.impl(), start) : notFound; }

192192 size_t reverseFind(const String& str, unsigned start, bool caseSensitive) const
193193 { return caseSensitive ? reverseFind(str, start) : reverseFindIgnoringCase(str, start); }
194194
195  const UChar* charactersWithNullTermination();
 195 WTF_EXPORT_PRIVATE const UChar* charactersWithNullTermination();
196196
197  UChar32 characterStartingAt(unsigned) const; // Ditto.
 197 WTF_EXPORT_PRIVATE UChar32 characterStartingAt(unsigned) const; // Ditto.
198198
199199 bool contains(UChar c) const { return find(c) != notFound; }
200200 bool contains(const char* str, bool caseSensitive = true) const { return find(str, 0, caseSensitive) != notFound; }

205205 bool endsWith(const String& s, bool caseSensitive = true) const
206206 { return m_impl ? m_impl->endsWith(s.impl(), caseSensitive) : s.isEmpty(); }
207207
208  void append(const String&);
209  void append(char);
210  void append(UChar);
211  void append(const UChar*, unsigned length);
212  void insert(const String&, unsigned pos);
 208 WTF_EXPORT_PRIVATE void append(const String&);
 209 WTF_EXPORT_PRIVATE void append(char);
 210 WTF_EXPORT_PRIVATE void append(UChar);
 211 WTF_EXPORT_PRIVATE void append(const UChar*, unsigned length);
 212 WTF_EXPORT_PRIVATE void insert(const String&, unsigned pos);
213213 void insert(const UChar*, unsigned length, unsigned pos);
214214
215215 String& replace(UChar a, UChar b) { if (m_impl) m_impl = m_impl->replace(a, b); return *this; }

221221 void makeUpper() { if (m_impl) m_impl = m_impl->upper(); }
222222 void makeSecure(UChar aChar) { if (m_impl) m_impl = m_impl->secure(aChar); }
223223
224  void truncate(unsigned len);
225  void remove(unsigned pos, int len = 1);
 224 WTF_EXPORT_PRIVATE void truncate(unsigned len);
 225 WTF_EXPORT_PRIVATE void remove(unsigned pos, int len = 1);
226226
227  String substring(unsigned pos, unsigned len = UINT_MAX) const;
 227 WTF_EXPORT_PRIVATE String substring(unsigned pos, unsigned len = UINT_MAX) const;
228228 String substringSharingImpl(unsigned pos, unsigned len = UINT_MAX) const;
229229 String left(unsigned len) const { return substring(0, len); }
230230 String right(unsigned len) const { return substring(length() - len, len); }
231231
232232 // Returns a lowercase/uppercase version of the string
233  String lower() const;
234  String upper() const;
 233 WTF_EXPORT_PRIVATE String lower() const;
 234 WTF_EXPORT_PRIVATE String upper() const;
235235
236  String stripWhiteSpace() const;
237  String simplifyWhiteSpace() const;
 236 WTF_EXPORT_PRIVATE String stripWhiteSpace() const;
 237 WTF_EXPORT_PRIVATE String simplifyWhiteSpace() const;
238238
239  String removeCharacters(CharacterMatchFunctionPtr) const;
 239 WTF_EXPORT_PRIVATE String removeCharacters(CharacterMatchFunctionPtr) const;
240240 template<bool isSpecialCharacter(UChar)> bool isAllSpecialCharacters() const;
241241
242242 // Return the string with case folded for case insensitive comparison.
243  String foldCase() const;
 243 WTF_EXPORT_PRIVATE String foldCase() const;
244244
245245#if !PLATFORM(QT)
246  static String format(const char *, ...) WTF_ATTRIBUTE_PRINTF(1, 2);
 246 WTF_EXPORT_PRIVATE static String format(const char *, ...) WTF_ATTRIBUTE_PRINTF(1, 2);
247247#else
248  static String format(const char *, ...);
 248 WTF_EXPORT_PRIVATE static String format(const char *, ...);
249249#endif
250250
251251 // Returns an uninitialized string. The characters needs to be written

253253 // Failure to do this will have unpredictable results.
254254 static String createUninitialized(unsigned length, UChar*& data) { return StringImpl::createUninitialized(length, data); }
255255
256  void split(const String& separator, Vector<String>& result) const;
257  void split(const String& separator, bool allowEmptyEntries, Vector<String>& result) const;
258  void split(UChar separator, Vector<String>& result) const;
259  void split(UChar separator, bool allowEmptyEntries, Vector<String>& result) const;
 256 WTF_EXPORT_PRIVATE void split(const String& separator, Vector<String>& result) const;
 257 WTF_EXPORT_PRIVATE void split(const String& separator, bool allowEmptyEntries, Vector<String>& result) const;
 258 WTF_EXPORT_PRIVATE void split(UChar separator, Vector<String>& result) const;
 259 WTF_EXPORT_PRIVATE void split(UChar separator, bool allowEmptyEntries, Vector<String>& result) const;
260260
261  int toIntStrict(bool* ok = 0, int base = 10) const;
262  unsigned toUIntStrict(bool* ok = 0, int base = 10) const;
263  int64_t toInt64Strict(bool* ok = 0, int base = 10) const;
264  uint64_t toUInt64Strict(bool* ok = 0, int base = 10) const;
265  intptr_t toIntPtrStrict(bool* ok = 0, int base = 10) const;
 261 WTF_EXPORT_PRIVATE int toIntStrict(bool* ok = 0, int base = 10) const;
 262 WTF_EXPORT_PRIVATE unsigned toUIntStrict(bool* ok = 0, int base = 10) const;
 263 WTF_EXPORT_PRIVATE int64_t toInt64Strict(bool* ok = 0, int base = 10) const;
 264 WTF_EXPORT_PRIVATE uint64_t toUInt64Strict(bool* ok = 0, int base = 10) const;
 265 WTF_EXPORT_PRIVATE intptr_t toIntPtrStrict(bool* ok = 0, int base = 10) const;
266266
267  int toInt(bool* ok = 0) const;
268  unsigned toUInt(bool* ok = 0) const;
 267 WTF_EXPORT_PRIVATE int toInt(bool* ok = 0) const;
 268 WTF_EXPORT_PRIVATE unsigned toUInt(bool* ok = 0) const;
269269 int64_t toInt64(bool* ok = 0) const;
270  uint64_t toUInt64(bool* ok = 0) const;
271  intptr_t toIntPtr(bool* ok = 0) const;
272  double toDouble(bool* ok = 0, bool* didReadNumber = 0) const;
273  float toFloat(bool* ok = 0, bool* didReadNumber = 0) const;
 270 WTF_EXPORT_PRIVATE uint64_t toUInt64(bool* ok = 0) const;
 271 WTF_EXPORT_PRIVATE intptr_t toIntPtr(bool* ok = 0) const;
 272 WTF_EXPORT_PRIVATE double toDouble(bool* ok = 0, bool* didReadNumber = 0) const;
 273 WTF_EXPORT_PRIVATE float toFloat(bool* ok = 0, bool* didReadNumber = 0) const;
274274
275275 bool percentage(int& percentage) const;
276276
277277 // Returns a StringImpl suitable for use on another thread.
278  String crossThreadString() const;
 278 WTF_EXPORT_PRIVATE String crossThreadString() const;
279279 // Makes a deep copy. Helpful only if you need to use a String on another thread
280280 // (use crossThreadString if the method call doesn't need to be threadsafe).
281281 // Since the underlying StringImpl objects are immutable, there's no other reason
282282 // to ever prefer copy() over plain old assignment.
283  String threadsafeCopy() const;
 283 WTF_EXPORT_PRIVATE String threadsafeCopy() const;
284284
285285 // Prevent Strings from being implicitly convertable to bool as it will be ambiguous on any platform that
286286 // allows implicit conversion to another pointer type (e.g., Mac allows implicit conversion to NSString*).

309309#endif
310310
311311#if PLATFORM(WX)
312  String(const wxString&);
313  operator wxString() const;
 312 WTF_EXPORT_PRIVATE String(const wxString&);
 313 WTF_EXPORT_PRIVATE operator wxString() const;
314314#endif
315315
316316#if PLATFORM(HAIKU)

324324
325325 // String::fromUTF8 will return a null string if
326326 // the input data contains invalid UTF-8 sequences.
327  static String fromUTF8(const char*, size_t);
328  static String fromUTF8(const char*);
 327 WTF_EXPORT_PRIVATE static String fromUTF8(const char*, size_t);
 328 WTF_EXPORT_PRIVATE static String fromUTF8(const char*);
329329
330330 // Tries to convert the passed in string to UTF-8, but will fall back to Latin-1 if the string is not valid UTF-8.
331  static String fromUTF8WithLatin1Fallback(const char*, size_t);
 331 WTF_EXPORT_PRIVATE static String fromUTF8WithLatin1Fallback(const char*, size_t);
332332
333333 // Determines the writing direction using the Unicode Bidi Algorithm rules P2 and P3.
334334 WTF::Unicode::Direction defaultWritingDirection(bool* hasStrongDirectionality = 0) const

345345
346346 // Hash table deleted values, which are only constructed and never copied or destroyed.
347347 String(WTF::HashTableDeletedValueType) : m_impl(WTF::HashTableDeletedValue) { }
348  bool isHashTableDeletedValue() const { return m_impl.isHashTableDeletedValue(); }
 348 WTF_EXPORT_PRIVATE bool isHashTableDeletedValue() const { return m_impl.isHashTableDeletedValue(); }
349349
350350private:
351351 RefPtr<StringImpl> m_impl;

356356QDataStream& operator>>(QDataStream& stream, String& str);
357357#endif
358358
359 String operator+(const String&, const String&);
360 String operator+(const String&, const char*);
361 String operator+(const char*, const String&);
 359WTF_EXPORT_PRIVATE String operator+(const String&, const String&);
 360WTF_EXPORT_PRIVATE String operator+(const String&, const char*);
 361WTF_EXPORT_PRIVATE String operator+(const char*, const String&);
362362
363363inline String& operator+=(String& a, const String& b) { a.append(b); return a; }
364364

419419 return !(ored & 0xFF00);
420420}
421421
422 int codePointCompare(const String&, const String&);
 422WTF_EXPORT_PRIVATE int codePointCompare(const String&, const String&);
423423
424424inline size_t find(const UChar* characters, unsigned length, UChar matchCharacter, unsigned index = 0)
425425{
82513

Source/JavaScriptCore/wtf/text/StringImpl.h

141141 }
142142
143143public:
144  ~StringImpl();
 144 WTF_EXPORT_PRIVATE ~StringImpl();
145145
146  static PassRefPtr<StringImpl> create(const UChar*, unsigned length);
147  static PassRefPtr<StringImpl> create(const char*, unsigned length);
148  static PassRefPtr<StringImpl> create(const char*);
 146 WTF_EXPORT_PRIVATE static PassRefPtr<StringImpl> create(const UChar*, unsigned length);
 147 WTF_EXPORT_PRIVATE static PassRefPtr<StringImpl> create(const char*, unsigned length);
 148 WTF_EXPORT_PRIVATE static PassRefPtr<StringImpl> create(const char*);
149149 static PassRefPtr<StringImpl> create(const UChar*, unsigned length, PassRefPtr<SharedUChar> sharedBuffer);
150150 static ALWAYS_INLINE PassRefPtr<StringImpl> create(PassRefPtr<StringImpl> rep, unsigned offset, unsigned length)
151151 {

159159 return adoptRef(new StringImpl(rep->m_data + offset, length, ownerRep));
160160 }
161161
162  static PassRefPtr<StringImpl> createUninitialized(unsigned length, UChar*& data);
 162 WTF_EXPORT_PRIVATE static PassRefPtr<StringImpl> createUninitialized(unsigned length, UChar*& data);
163163 static ALWAYS_INLINE PassRefPtr<StringImpl> tryCreateUninitialized(unsigned length, UChar*& output)
164164 {
165165 if (!length) {

195195 }
196196 return empty();
197197 }
198  static PassRefPtr<StringImpl> adopt(StringBuffer&);
 198 WTF_EXPORT_PRIVATE static PassRefPtr<StringImpl> adopt(StringBuffer&);
199199
200200 SharedUChar* sharedBuffer();
201  const UChar* characters() const { return m_data; }
 201 WTF_EXPORT_PRIVATE const UChar* characters() const { return m_data; }
202202
203203 size_t cost()
204204 {

241241 ALWAYS_INLINE void deref() { m_refCountAndFlags -= s_refCountIncrement; if (!(m_refCountAndFlags & (s_refCountMask | s_refCountFlagStatic))) delete this; }
242242 ALWAYS_INLINE bool hasOneRef() const { return (m_refCountAndFlags & (s_refCountMask | s_refCountFlagStatic)) == s_refCountIncrement; }
243243
244  static StringImpl* empty();
 244 WTF_EXPORT_PRIVATE static StringImpl* empty();
245245
246246 static void copyChars(UChar* destination, const UChar* source, unsigned numCharacters)
247247 {

259259 // Since StringImpl objects are immutable, there's no other reason to make a copy.
260260 PassRefPtr<StringImpl> threadsafeCopy() const;
261261
262  PassRefPtr<StringImpl> substring(unsigned pos, unsigned len = UINT_MAX);
 262 WTF_EXPORT_PRIVATE PassRefPtr<StringImpl> substring(unsigned pos, unsigned len = UINT_MAX);
263263
264264 UChar operator[](unsigned i) { ASSERT(i < m_length); return m_data[i]; }
265265 UChar32 characterStartingAt(unsigned);
266266
267  bool containsOnlyWhitespace();
 267 WTF_EXPORT_PRIVATE bool containsOnlyWhitespace();
268268
269269 int toIntStrict(bool* ok = 0, int base = 10);
270270 unsigned toUIntStrict(bool* ok = 0, int base = 10);

272272 uint64_t toUInt64Strict(bool* ok = 0, int base = 10);
273273 intptr_t toIntPtrStrict(bool* ok = 0, int base = 10);
274274
275  int toInt(bool* ok = 0); // ignores trailing garbage
 275 WTF_EXPORT_PRIVATE int toInt(bool* ok = 0); // ignores trailing garbage
276276 unsigned toUInt(bool* ok = 0); // ignores trailing garbage
277277 int64_t toInt64(bool* ok = 0); // ignores trailing garbage
278278 uint64_t toUInt64(bool* ok = 0); // ignores trailing garbage

281281 double toDouble(bool* ok = 0, bool* didReadNumber = 0);
282282 float toFloat(bool* ok = 0, bool* didReadNumber = 0);
283283
284  PassRefPtr<StringImpl> lower();
285  PassRefPtr<StringImpl> upper();
 284 WTF_EXPORT_PRIVATE PassRefPtr<StringImpl> lower();
 285 WTF_EXPORT_PRIVATE PassRefPtr<StringImpl> upper();
286286
287287 enum LastCharacterBehavior { ObscureLastCharacter, DisplayLastCharacter };
288288
289  PassRefPtr<StringImpl> secure(UChar, LastCharacterBehavior = ObscureLastCharacter);
 289 WTF_EXPORT_PRIVATE PassRefPtr<StringImpl> secure(UChar, LastCharacterBehavior = ObscureLastCharacter);
290290 PassRefPtr<StringImpl> foldCase();
291291
292292 PassRefPtr<StringImpl> stripWhiteSpace();
293  PassRefPtr<StringImpl> simplifyWhiteSpace();
 293 WTF_EXPORT_PRIVATE PassRefPtr<StringImpl> simplifyWhiteSpace();
294294
295295 PassRefPtr<StringImpl> removeCharacters(CharacterMatchFunctionPtr);
296296
297  size_t find(UChar, unsigned index = 0);
298  size_t find(CharacterMatchFunctionPtr, unsigned index = 0);
299  size_t find(const char*, unsigned index = 0);
300  size_t find(StringImpl*, unsigned index = 0);
301  size_t findIgnoringCase(const char*, unsigned index = 0);
302  size_t findIgnoringCase(StringImpl*, unsigned index = 0);
 297 WTF_EXPORT_PRIVATE size_t find(UChar, unsigned index = 0);
 298 WTF_EXPORT_PRIVATE size_t find(CharacterMatchFunctionPtr, unsigned index = 0);
 299 WTF_EXPORT_PRIVATE size_t find(const char*, unsigned index = 0);
 300 WTF_EXPORT_PRIVATE size_t find(StringImpl*, unsigned index = 0);
 301 WTF_EXPORT_PRIVATE size_t findIgnoringCase(const char*, unsigned index = 0);
 302 WTF_EXPORT_PRIVATE size_t findIgnoringCase(StringImpl*, unsigned index = 0);
303303
304  size_t reverseFind(UChar, unsigned index = UINT_MAX);
305  size_t reverseFind(StringImpl*, unsigned index = UINT_MAX);
306  size_t reverseFindIgnoringCase(StringImpl*, unsigned index = UINT_MAX);
 304 WTF_EXPORT_PRIVATE size_t reverseFind(UChar, unsigned index = UINT_MAX);
 305 WTF_EXPORT_PRIVATE size_t reverseFind(StringImpl*, unsigned index = UINT_MAX);
 306 WTF_EXPORT_PRIVATE size_t reverseFindIgnoringCase(StringImpl*, unsigned index = UINT_MAX);
307307
308308 bool startsWith(StringImpl* str, bool caseSensitive = true) { return (caseSensitive ? reverseFind(str, 0) : reverseFindIgnoringCase(str, 0)) == 0; }
309  bool endsWith(StringImpl*, bool caseSensitive = true);
 309 WTF_EXPORT_PRIVATE bool endsWith(StringImpl*, bool caseSensitive = true);
310310
311  PassRefPtr<StringImpl> replace(UChar, UChar);
312  PassRefPtr<StringImpl> replace(UChar, StringImpl*);
313  PassRefPtr<StringImpl> replace(StringImpl*, StringImpl*);
314  PassRefPtr<StringImpl> replace(unsigned index, unsigned len, StringImpl*);
 311 WTF_EXPORT_PRIVATE PassRefPtr<StringImpl> replace(UChar, UChar);
 312 WTF_EXPORT_PRIVATE PassRefPtr<StringImpl> replace(UChar, StringImpl*);
 313 WTF_EXPORT_PRIVATE PassRefPtr<StringImpl> replace(StringImpl*, StringImpl*);
 314 WTF_EXPORT_PRIVATE PassRefPtr<StringImpl> replace(unsigned index, unsigned len, StringImpl*);
315315
316  WTF::Unicode::Direction defaultWritingDirection(bool* hasStrongDirectionality = 0);
 316 WTF_EXPORT_PRIVATE WTF::Unicode::Direction defaultWritingDirection(bool* hasStrongDirectionality = 0);
317317
318318#if USE(CF)
319319 CFStringRef createCFString();

326326 // This number must be at least 2 to avoid sharing empty, null as well as 1 character strings from SmallStrings.
327327 static const unsigned s_copyCharsInlineCutOff = 20;
328328
329  static PassRefPtr<StringImpl> createStrippingNullCharactersSlowCase(const UChar*, unsigned length);
 329 WTF_EXPORT_PRIVATE static PassRefPtr<StringImpl> createStrippingNullCharactersSlowCase(const UChar*, unsigned length);
330330
331331 BufferOwnership bufferOwnership() const { return static_cast<BufferOwnership>(m_refCountAndFlags & s_refCountMaskBufferOwnership); }
332332 bool isStatic() const { return m_refCountAndFlags & s_refCountFlagStatic; }

339339 mutable unsigned m_hash;
340340};
341341
342 bool equal(const StringImpl*, const StringImpl*);
343 bool equal(const StringImpl*, const char*);
 342WTF_EXPORT_PRIVATE bool equal(const StringImpl*, const StringImpl*);
 343WTF_EXPORT_PRIVATE bool equal(const StringImpl*, const char*);
344344inline bool equal(const char* a, StringImpl* b) { return equal(b, a); }
345345
346 bool equalIgnoringCase(StringImpl*, StringImpl*);
347 bool equalIgnoringCase(StringImpl*, const char*);
 346WTF_EXPORT_PRIVATE bool equalIgnoringCase(StringImpl*, StringImpl*);
 347WTF_EXPORT_PRIVATE bool equalIgnoringCase(StringImpl*, const char*);
348348inline bool equalIgnoringCase(const char* a, StringImpl* b) { return equalIgnoringCase(b, a); }
349 bool equalIgnoringCase(const UChar* a, const char* b, unsigned length);
 349WTF_EXPORT_PRIVATE bool equalIgnoringCase(const UChar*, const char*, unsigned length);
350350inline bool equalIgnoringCase(const char* a, const UChar* b, unsigned length) { return equalIgnoringCase(b, a, length); }
351351
352 bool equalIgnoringNullity(StringImpl*, StringImpl*);
 352WTF_EXPORT_PRIVATE bool equalIgnoringNullity(StringImpl*, StringImpl*);
353353
354354template<size_t inlineCapacity>
355355bool equalIgnoringNullity(const Vector<UChar, inlineCapacity>& a, StringImpl* b)
82513

Source/JavaScriptCore/wtf/ByteArray.h

8080 }
8181 }
8282
83  static PassRefPtr<ByteArray> create(size_t size);
 83 WTF_EXPORT_PRIVATE static PassRefPtr<ByteArray> create(size_t);
8484
8585 private:
8686 ByteArray(size_t size)
82513

Source/JavaScriptCore/wtf/Platform.h

11931193 since most ports try to support sub-project independence, adding new headers
11941194 to WTF causes many ports to break, and so this way we can address the build
11951195 breakages one port at a time. */
 1196#if PLATFORM(WX)
 1197#define WTF_USE_EXPORT_MACROS 1
 1198#else
11961199#define WTF_USE_EXPORT_MACROS 0
1197 
 1200#endif
11981201#endif /* WTF_Platform_h */
82513

Source/JavaScriptCore/interpreter/Interpreter.h

100100 JSValue execute(EvalExecutable* evalNode, CallFrame* exec, JSObject* thisObj, ScopeChainNode* scopeChain);
101101
102102 JSValue retrieveArguments(CallFrame*, JSFunction*) const;
103  JSValue retrieveCaller(CallFrame*, JSFunction*) const;
104  void retrieveLastCaller(CallFrame*, int& lineNumber, intptr_t& sourceID, UString& sourceURL, JSValue& function) const;
 103 JS_EXPORT_PRIVATE JSValue retrieveCaller(CallFrame*, JSFunction*) const;
 104 JS_EXPORT_PRIVATE void retrieveLastCaller(CallFrame*, int& lineNumber, intptr_t& sourceID, UString& sourceURL, JSValue& function) const;
105105
106106 void getArgumentsData(CallFrame*, JSFunction*&, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc);
107107
82513

Source/JavaScriptCore/yarr/YarrPattern.h

313313};
314314
315315struct YarrPattern {
316  YarrPattern(const UString& pattern, bool ignoreCase, bool multiline, const char** error);
 316 JS_EXPORT_PRIVATE YarrPattern(const UString& pattern, bool ignoreCase, bool multiline, const char** error);
317317
318318 ~YarrPattern()
319319 {
82513

Source/JavaScriptCore/yarr/Yarr.h

5757 JSRegExpErrorInternal = -4
5858};
5959
60 PassOwnPtr<BytecodePattern> byteCompile(YarrPattern&, BumpPointerAllocator*);
61 int interpret(BytecodePattern*, const UChar* input, unsigned start, unsigned length, int* output);
 60JS_EXPORT_PRIVATE PassOwnPtr<BytecodePattern> byteCompile(YarrPattern&, BumpPointerAllocator*);
 61JS_EXPORT_PRIVATE int interpret(BytecodePattern*, const UChar* input, unsigned start, unsigned length, int* output);
6262
6363} } // namespace JSC::Yarr
6464
82513

Source/JavaScriptCore/ChangeLog

 12011-03-30 Kevin Ollivier <kevino@theolliviers.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Add export macros to all exported JSCore methods.
 6
 7 https://bugs.webkit.org/show_bug.cgi?id=27551
 8
 9 * bytecompiler/BytecodeGenerator.h:
 10 * collector/handles/HandleHeap.h:
 11 * config.h:
 12 * debugger/Debugger.h:
 13 * debugger/DebuggerCallFrame.h:
 14 * interpreter/Interpreter.h:
 15 * parser/SourceProviderCache.h:
 16 * profiler/Profiler.h:
 17 * runtime/ArgList.h:
 18 * runtime/CallData.h:
 19 * runtime/Completion.h:
 20 * runtime/ConstructData.h:
 21 * runtime/DateInstance.h:
 22 * runtime/Error.h:
 23 * runtime/ExceptionHelpers.h:
 24 * runtime/FunctionConstructor.h:
 25 * runtime/Heap.h:
 26 * runtime/Identifier.h:
 27 (JSC::Identifier::toUInt32):
 28 (JSC::Identifier::equal):
 29 * runtime/InitializeThreading.h:
 30 * runtime/InternalFunction.h:
 31 * runtime/JSArray.h:
 32 * runtime/JSByteArray.h:
 33 * runtime/JSCell.h:
 34 (JSC::JSCell::JSCell::classInfo):
 35 (JSC::JSCell::JSCell::vptr):
 36 (JSC::JSCell::JSCell::setVPtr):
 37 (JSC::JSCell::JSCell::isString):
 38 * runtime/JSFunction.h:
 39 * runtime/JSGlobalData.h:
 40 * runtime/JSGlobalObject.h:
 41 * runtime/JSLock.h:
 42 * runtime/JSObject.h:
 43 * runtime/JSObjectWithGlobalObject.h:
 44 * runtime/JSValue.h:
 45 * runtime/JSVariableObject.h:
 46 * runtime/JSWrapperObject.h:
 47 * runtime/Lookup.h:
 48 * runtime/MarkedSpace.h:
 49 * runtime/ObjectPrototype.h:
 50 * runtime/PropertyDescriptor.h:
 51 * runtime/PropertyNameArray.h:
 52 (JSC::PropertyNameArray::add):
 53 * runtime/PropertySlot.h:
 54 * runtime/RegExp.h:
 55 * runtime/RegExpObject.h:
 56 * runtime/RopeImpl.h:
 57 * runtime/ScopeChain.h:
 58 * runtime/SmallStrings.h:
 59 * runtime/StringObject.h:
 60 * runtime/Structure.h:
 61 * runtime/TimeoutChecker.h:
 62 * runtime/UString.h:
 63 (JSC::UString::UString):
 64 * wscript:
 65 * wtf/ByteArray.h:
 66 * wtf/CryptographicallyRandomNumber.h:
 67 * wtf/CurrentTime.h:
 68 * wtf/DateMath.h:
 69 * wtf/DecimalNumber.h:
 70 * wtf/FastMalloc.h:
 71 * wtf/MD5.h:
 72 * wtf/MainThread.h:
 73 * wtf/NullPtr.cpp:
 74 * wtf/NullPtr.h:
 75 * wtf/OSAllocator.h:
 76 * wtf/Platform.h:
 77 * wtf/RandomNumber.h:
 78 * wtf/RefCountedLeakCounter.h:
 79 * wtf/ThreadSpecific.h:
 80 * wtf/Threading.h:
 81 * wtf/ThreadingPrimitives.h:
 82 * wtf/WTFThreadData.h:
 83 * wtf/dtoa.h:
 84 * wtf/text/AtomicString.h:
 85 (WTF::AtomicString::AtomicString):
 86 (WTF::AtomicString::isHashTableDeletedValue):
 87 (WTF::AtomicString::~AtomicString):
 88 (WTF::AtomicString::impl):
 89 * wtf/text/CString.h:
 90 * wtf/text/StringBuilder.h:
 91 * wtf/text/StringImpl.h:
 92 (WTF::StringImpl::characters):
 93 * wtf/text/WTFString.h:
 94 (WTF::String::String):
 95 (WTF::String::findIgnoringCase):
 96 (WTF::String::isHashTableDeletedValue):
 97 * wtf/unicode/Collator.h:
 98 * wtf/unicode/UTF8.h:
 99 * yarr/Yarr.h:
 100 * yarr/YarrPattern.h:
 101
11022011-03-30 Adam Roben <aroben@apple.com>
2103
3104 Clean build fix
82532

Source/JavaScriptCore/wscript

4747def build(bld):
4848 import Options
4949
 50 bld.env.LIBDIR = output_dir
5051 full_dirs = get_dirs_for_features(jscore_dir, features=[build_port], dirs=jscore_dirs)
5152
5253 includes = common_includes + full_dirs

5556
5657 # 1. A simple program
5758 jscore = bld.new_task_gen(
58  features = 'cxx cstaticlib',
 59 features = 'cxx cshlib implib',
5960 includes = '. .. assembler DerivedSources ForwardingHeaders ' + ' '.join(includes),
6061 source = sources,
 62 defines = ['BUILDING_JavaScriptCore'],
6163 target = 'jscore',
6264 uselib = 'WX ICU ' + get_config(),
6365 uselib_local = '',
82513

Source/JavaScriptCore/parser/SourceProviderCache.h

3333class SourceProviderCache {
3434public:
3535 SourceProviderCache() : m_contentByteSize(0) {}
36  ~SourceProviderCache();
 36 JS_EXPORT_PRIVATE ~SourceProviderCache();
3737
38  void clear();
39  unsigned byteSize() const;
 38 JS_EXPORT_PRIVATE void clear();
 39 JS_EXPORT_PRIVATE unsigned byteSize() const;
4040 void add(int sourcePosition, PassOwnPtr<SourceProviderCacheItem>, unsigned size);
4141 const SourceProviderCacheItem* get(int sourcePosition) const { return m_map.get(sourcePosition); }
4242
82513

Source/JavaScriptCore/profiler/Profiler.h

5353 return &s_sharedEnabledProfilerReference;
5454 }
5555
56  static Profiler* profiler();
 56 JS_EXPORT_PRIVATE static Profiler* profiler();
5757 static CallIdentifier createCallIdentifier(ExecState* exec, JSValue, const UString& sourceURL, int lineNumber);
5858
59  void startProfiling(ExecState*, const UString& title);
60  PassRefPtr<Profile> stopProfiling(ExecState*, const UString& title);
 59 JS_EXPORT_PRIVATE void startProfiling(ExecState*, const UString& title);
 60 JS_EXPORT_PRIVATE PassRefPtr<Profile> stopProfiling(ExecState*, const UString& title);
6161 void stopProfiling(JSGlobalObject*);
6262
6363 void willExecute(ExecState* callerCallFrame, JSValue function);
82513

Source/JavaScriptCore/debugger/DebuggerCallFrame.h

5151 JSGlobalObject* dynamicGlobalObject() const { return m_callFrame->dynamicGlobalObject(); }
5252 ScopeChainNode* scopeChain() const { return m_callFrame->scopeChain(); }
5353 const UString* functionName() const;
54  UString calculatedFunctionName() const;
55  Type type() const;
56  JSObject* thisObject() const;
57  JSValue evaluate(const UString&, JSValue& exception) const;
 54 JS_EXPORT_PRIVATE UString calculatedFunctionName() const;
 55 JS_EXPORT_PRIVATE Type type() const;
 56 JS_EXPORT_PRIVATE JSObject* thisObject() const;
 57 JS_EXPORT_PRIVATE JSValue evaluate(const UString&, JSValue& exception) const;
5858 JSValue exception() const { return m_exception; }
5959
6060 private:
82513

Source/JavaScriptCore/debugger/Debugger.h

3434 class SourceProvider;
3535 class UString;
3636
37  class Debugger {
 37 class JS_EXPORT_PRIVATE Debugger {
3838 public:
3939 virtual ~Debugger();
4040
82513

Source/JavaScriptCore/collector/handles/HandleHeap.h

6262 // Should only be called during teardown.
6363 void clearWeakPointers();
6464
65  void writeBarrier(HandleSlot, const JSValue&);
 65 JS_EXPORT_PRIVATE void writeBarrier(HandleSlot, const JSValue&);
6666
6767#if !ASSERT_DISABLED
6868 Finalizer* getFinalizer(HandleSlot handle)

112112 static HandleSlot toHandle(Node*);
113113 static Node* toNode(HandleSlot);
114114
115  void grow();
 115 JS_EXPORT_PRIVATE void grow();
116116
117117 JSGlobalData* m_globalData;
118118 BlockStack<Node> m_blockStack;
82513

Source/WebCore/config.h

6464#else
6565#define WEBKIT_EXPORTDATA __declspec(dllimport)
6666#endif
67 #define WTF_EXPORT_PRIVATE JS_EXPORTDATA
68 #define JS_EXPORT_PRIVATE JS_EXPORTDATA
 67#define WTF_EXPORT_PRIVATE
 68#define JS_EXPORT_PRIVATE
6969#define JS_EXPORTCLASS JS_EXPORTDATA
7070#else
7171#define JS_EXPORTDATA
82513

Source/WebCore/ChangeLog

 12011-03-30 Kevin Ollivier <kevino@theolliviers.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Add export macros to all exported JSCore methods.
 6
 7 https://bugs.webkit.org/show_bug.cgi?id=27551
 8
 9 * config.h:
 10
1112011-03-30 Chris Guillory <chris.guillory@google.com>
212
313 Reviewed by Dimitri Glazkov.
82532