Skip to content

Commit 1aa812d

Browse files
committed
Replace the use of LEGACY_NODELETE with NODELETE in Source/JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=330203 Reviewed by Mark Lam. Replaced the use of LEGACY_NODELETE with NODELETE. No new tests since there should be no behavioral changes. Canonical link: https://commits.webkit.org/325868@main
1 parent 56f77fd commit 1aa812d

462 files changed

Lines changed: 2097 additions & 2095 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Source/JavaScriptCore/API/tests/CompareAndSwapTest.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Bitmap {
3939

4040
inline void clearAll();
4141
inline bool concurrentTestAndSet(size_t n);
42-
inline size_t LEGACY_NODELETE numBits() const { return words * wordSize; }
42+
NODELETE inline size_t numBits() const { return words * wordSize; }
4343

4444
private:
4545
static constexpr size_t Size = 4096*10;
@@ -56,7 +56,7 @@ inline void Bitmap::clearAll()
5656
memset(&bits, 0, sizeof(bits));
5757
}
5858

59-
inline bool LEGACY_NODELETE Bitmap::concurrentTestAndSet(size_t n)
59+
NODELETE inline bool Bitmap::concurrentTestAndSet(size_t n)
6060
{
6161
uint8_t mask = one << (n % wordSize);
6262
size_t index = n / wordSize;

‎Source/JavaScriptCore/API/tests/ExecutionTimeLimitTest.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ static JSValueRef currentCPUTimeAsJSFunctionCallback(JSContextRef ctx, JSObjectR
6262
}
6363

6464
bool shouldTerminateCallbackWasCalled = false;
65-
static bool LEGACY_NODELETE shouldTerminateCallback(JSContextRef, void*)
65+
NODELETE static bool shouldTerminateCallback(JSContextRef, void*)
6666
{
6767
shouldTerminateCallbackWasCalled = true;
6868
return true;
6969
}
7070

7171
bool cancelTerminateCallbackWasCalled = false;
72-
static bool LEGACY_NODELETE cancelTerminateCallback(JSContextRef, void*)
72+
NODELETE static bool cancelTerminateCallback(JSContextRef, void*)
7373
{
7474
cancelTerminateCallbackWasCalled = true;
7575
return false;
@@ -89,7 +89,7 @@ static bool extendTerminateCallback(JSContextRef ctx, void*)
8989

9090
#if HAVE(MACH_EXCEPTIONS)
9191
bool dispatchTerminateCallbackCalled = false;
92-
static bool LEGACY_NODELETE dispatchTermitateCallback(JSContextRef, void*)
92+
NODELETE static bool dispatchTermitateCallback(JSContextRef, void*)
9393
{
9494
dispatchTerminateCallbackCalled = true;
9595
return true;

‎Source/JavaScriptCore/API/tests/GlobalContextWithFinalizerTest.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
static bool failed = true;
3333

34-
static void LEGACY_NODELETE finalize(JSObjectRef)
34+
NODELETE static void finalize(JSObjectRef)
3535
{
3636
failed = false;
3737
}

‎Source/JavaScriptCore/API/tests/Node.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct __Node {
4040
};
4141

4242
extern Node* Node_new(void);
43-
extern void LEGACY_NODELETE Node_ref(Node* node);
43+
NODELETE extern void Node_ref(Node* node);
4444
extern void Node_deref(Node* node);
4545
extern void Node_appendChild(Node* node, Node* child);
4646
extern void Node_removeChild(Node* node, Node* child);

‎Source/JavaScriptCore/API/tests/NodeList.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ typedef struct {
3333
} NodeList;
3434

3535
extern NodeList* NodeList_new(Node* parentNode);
36-
extern unsigned LEGACY_NODELETE NodeList_length(NodeList*);
37-
extern Node* LEGACY_NODELETE NodeList_item(NodeList*, unsigned);
38-
extern void LEGACY_NODELETE NodeList_ref(NodeList*);
36+
NODELETE extern unsigned NodeList_length(NodeList*);
37+
NODELETE extern Node* NodeList_item(NodeList*, unsigned);
38+
NODELETE extern void NodeList_ref(NodeList*);
3939
extern void NodeList_deref(NodeList*);

‎Source/JavaScriptCore/API/tests/TypedArrayCTest.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN
3636

3737
extern "C" void JSSynchronousGarbageCollectForDebugging(JSContextRef);
3838

39-
static void LEGACY_NODELETE bytesDeallocatorNoCopy(void*, void*) { }
39+
NODELETE static void bytesDeallocatorNoCopy(void*, void*) { }
4040
static void freePtr(void* ptr, void*)
4141
{
4242
free(ptr);

‎Source/JavaScriptCore/API/tests/testapi.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ static JSValueRef MyObject_convertToType(JSContextRef context, JSObjectRef objec
391391
return JSValueMakeNull(context);
392392
}
393393

394-
static JSValueRef LEGACY_NODELETE MyObject_convertToTypeWrapper(JSContextRef context, JSObjectRef object, JSType type, JSValueRef* exception)
394+
NODELETE static JSValueRef MyObject_convertToTypeWrapper(JSContextRef context, JSObjectRef object, JSType type, JSValueRef* exception)
395395
{
396396
UNUSED_PARAM(context);
397397
UNUSED_PARAM(object);
@@ -401,7 +401,7 @@ static JSValueRef LEGACY_NODELETE MyObject_convertToTypeWrapper(JSContextRef con
401401
return 0;
402402
}
403403

404-
static bool LEGACY_NODELETE MyObject_set_nullGetForwardSet(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
404+
NODELETE static bool MyObject_set_nullGetForwardSet(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
405405
{
406406
UNUSED_PARAM(ctx);
407407
UNUSED_PARAM(object);
@@ -762,7 +762,7 @@ static JSValueRef Base_callAsFunction(JSContextRef ctx, JSObjectRef function, JS
762762
return JSValueMakeNumber(ctx, 1); // distinguish base call from derived call
763763
}
764764

765-
static JSValueRef LEGACY_NODELETE Base_returnHardNull(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
765+
NODELETE static JSValueRef Base_returnHardNull(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
766766
{
767767
UNUSED_PARAM(ctx);
768768
UNUSED_PARAM(function);
@@ -949,7 +949,7 @@ static JSObjectRef myConstructor_callAsConstructor(JSContextRef context, JSObjec
949949
return result;
950950
}
951951

952-
static JSObjectRef LEGACY_NODELETE myBadConstructor_callAsConstructor(JSContextRef context, JSObjectRef constructorObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
952+
NODELETE static JSObjectRef myBadConstructor_callAsConstructor(JSContextRef context, JSObjectRef constructorObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
953953
{
954954
UNUSED_PARAM(context);
955955
UNUSED_PARAM(constructorObject);
@@ -1179,7 +1179,7 @@ static bool globalContextNameTest(void)
11791179
}
11801180

11811181
IGNORE_GCC_WARNINGS_BEGIN("unused-but-set-variable")
1182-
static void LEGACY_NODELETE checkConstnessInJSObjectNames(void)
1182+
NODELETE static void checkConstnessInJSObjectNames(void)
11831183
{
11841184
JSStaticFunction fun;
11851185
fun.name = "something";

‎Source/JavaScriptCore/API/tests/testapi.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class TestAPI {
139139
void heapMembershipChanges();
140140
void testBigInt();
141141

142-
int LEGACY_NODELETE failed() const { return m_failed; }
142+
NODELETE int failed() const { return m_failed; }
143143

144144
private:
145145

‎Source/JavaScriptCore/assembler/AssemblyComments.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class AssemblyCommentRegistry {
4040
WTF_MAKE_TZONE_ALLOCATED(AssemblyCommentRegistry);
4141
WTF_MAKE_NONCOPYABLE(AssemblyCommentRegistry);
4242
public:
43-
static AssemblyCommentRegistry& LEGACY_NODELETE singleton();
43+
NODELETE static AssemblyCommentRegistry& singleton();
4444
static void initialize();
4545

4646
Lock& getLock() LIFETIME_BOUND WTF_RETURNS_LOCK(m_lock) { return m_lock; }

‎Source/JavaScriptCore/assembler/LinkBuffer.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ WTF_MAKE_TZONE_ALLOCATED_IMPL(IRDumpDebugInfo);
5151
WTF_MAKE_TZONE_ALLOCATED_IMPL(SourceCodeDumpDebugInfo);
5252
WTF_MAKE_TZONE_ALLOCATED_IMPL(LinkBuffer);
5353

54-
static const char* LEGACY_NODELETE profileName(LinkBuffer::Profile profile)
54+
NODELETE static const char* profileName(LinkBuffer::Profile profile)
5555
{
5656
#define RETURN_LINKBUFFER_PROFILE_NAME(name) case LinkBuffer::Profile::name: return #name;
5757
switch (profile) {
@@ -242,7 +242,7 @@ class BranchCompactionLinkBuffer {
242242
BranchCompactionLinkBufferMalloc::free(m_data);
243243
}
244244

245-
uint8_t* LEGACY_NODELETE data()
245+
NODELETE uint8_t* data()
246246
{
247247
return m_data;
248248
}

0 commit comments

Comments
 (0)