Skip to content

Commit 6040091

Browse files
committed
[MERGE #5242 @Cellule] Remove _ABSTRACT
Merge pull request #5242 from Cellule:abstract Remove _ABSTRACT, most classes were already pure virtual and I deleted the constructor of the others.
2 parents 1e14bd7 + f37cd54 commit 6040091

File tree

10 files changed

+14
-15
lines changed

10 files changed

+14
-15
lines changed

lib/Common/CommonPal.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -498,13 +498,6 @@ DWORD __cdecl CharUpperBuffW(const char16* lpsz, DWORD cchLength);
498498
#include <stdint.h>
499499
#endif
500500

501-
// MSVC specific keywords
502-
#if defined(_MSC_VER)
503-
#define _ABSTRACT abstract
504-
#else
505-
#define _ABSTRACT
506-
#endif
507-
508501
// `typename QualifiedName` declarations outside of template code not supported before MSVC 2015 update 1
509502
#if defined(_MSC_VER) && _MSC_VER < 1910
510503
#define _TYPENAME

lib/Common/DataStructures/BaseDictionary.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,8 +1180,10 @@ namespace JsUtil
11801180

11811181
protected:
11821182
template<class TDictionary, class Leaf>
1183-
class IteratorBase _ABSTRACT
1183+
class IteratorBase
11841184
{
1185+
IteratorBase() = delete;
1186+
11851187
protected:
11861188
EntryType *const entries;
11871189
int entryIndex;

lib/Runtime/Base/ThreadContext.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4814,6 +4814,7 @@ void JsReentLock::MutateArrayObject(Js::Var arrayObject)
48144814
}
48154815
}
48164816

4817+
48174818
void JsReentLock::MutateArrayObject()
48184819
{
48194820
if (CONFIG_FLAG(EnableArrayTypeMutation))

lib/Runtime/Base/ThreadContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct IProjectionContext
5757

5858
class ThreadContext;
5959

60-
class InterruptPoller _ABSTRACT
60+
class InterruptPoller
6161
{
6262
// Interface with a polling object located in the hosting layer.
6363

lib/Runtime/Base/ThreadServiceWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#pragma once
66
// This class is used to communicate between ThreadContext and JavascriptThreadService
77

8-
class ThreadServiceWrapper _ABSTRACT
8+
class ThreadServiceWrapper
99
{
1010
public:
1111
virtual bool ScheduleNextCollectOnExit() = 0;

lib/Runtime/Language/InlineCache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ namespace Js
473473
CompileAssert(sizeof(InlineCache) == sizeof(InlineCacheAllocator::CacheLayout));
474474
CompileAssert(offsetof(InlineCache, invalidationListSlotPtr) == offsetof(InlineCacheAllocator::CacheLayout, strongRef));
475475

476-
class PolymorphicInlineCache _ABSTRACT : public FinalizableObject
476+
class PolymorphicInlineCache : public FinalizableObject
477477
{
478478
DECLARE_RECYCLER_VERIFY_MARK_FRIEND()
479479
#ifdef INLINE_CACHE_STATS

lib/Runtime/Library/ArgumentsObject.h

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

77
namespace Js
88
{
9-
class ArgumentsObject _ABSTRACT : public DynamicObject
9+
class ArgumentsObject : public DynamicObject
1010
{
1111
private:
1212
static PropertyId specialPropertyIds[];

lib/Runtime/Library/ConcatString.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ namespace Js
8282
// Usage pattern:
8383
// // Create concat tree using one of non-abstract derived classes.
8484
// JavascriptString* result = concatTree->GetString(); // At this time we flatten the tree into 1 actual wchat_t* string.
85-
class ConcatStringBase _ABSTRACT : public LiteralString // vtable will be switched to LiteralString's vtable after flattening
85+
class ConcatStringBase : public LiteralString // vtable will be switched to LiteralString's vtable after flattening
8686
{
8787
friend JavascriptString;
8888

lib/Runtime/Library/JavascriptArrayIndexEnumeratorBase.h

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

77
namespace Js
88
{
9-
class JavascriptArrayIndexEnumeratorBase _ABSTRACT : public JavascriptEnumerator
9+
class JavascriptArrayIndexEnumeratorBase : public JavascriptEnumerator
1010
{
1111
protected:
1212
Field(JavascriptArray*) arrayObject;

lib/Runtime/Library/JavascriptString.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ namespace Js
2929
bool IsValidCharCount(size_t charCount);
3030
const charcount_t k_InvalidCharCount = static_cast<charcount_t>(-1);
3131

32-
class JavascriptString _ABSTRACT : public RecyclableObject
32+
class JavascriptString : public RecyclableObject
3333
{
3434
friend Lowerer;
3535
friend LowererMD;
3636
friend bool IsValidCharCount(size_t);
3737

38+
JavascriptString() = delete;
39+
JavascriptString(JavascriptString&) = delete;
40+
3841
private:
3942
Field(const char16*) m_pszValue; // Flattened, '\0' terminated contents
4043
Field(charcount_t) m_charLength; // Length in characters, not including '\0'.

0 commit comments

Comments
 (0)