Skip to content

Commit

Permalink
Don't explicitly track sequence index functions
Browse files Browse the repository at this point in the history
  • Loading branch information
GrieferAtWork committed May 20, 2024
1 parent 84e873f commit b5626c7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 274 deletions.
68 changes: 0 additions & 68 deletions src/deemon/objects/seq/default-api-methods-attrproxy-impl.c.inl
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ DECL_BEGIN
#define LOCAL_DeeSeq_DefaultFindWithKeyWithCallAttrFind DeeSeq_DefaultFindWithKeyWithCallAttrFind
#define LOCAL_DeeSeq_DefaultRFindWithCallAttrRFind DeeSeq_DefaultRFindWithCallAttrRFind
#define LOCAL_DeeSeq_DefaultRFindWithKeyWithCallAttrRFind DeeSeq_DefaultRFindWithKeyWithCallAttrRFind
#define LOCAL_DeeSeq_DefaultIndexWithCallAttrIndex DeeSeq_DefaultIndexWithCallAttrIndex
#define LOCAL_DeeSeq_DefaultIndexWithKeyWithCallAttrIndex DeeSeq_DefaultIndexWithKeyWithCallAttrIndex
#define LOCAL_DeeSeq_DefaultRIndexWithCallAttrRIndex DeeSeq_DefaultRIndexWithCallAttrRIndex
#define LOCAL_DeeSeq_DefaultRIndexWithKeyWithCallAttrRIndex DeeSeq_DefaultRIndexWithKeyWithCallAttrRIndex
#define LOCAL_DeeSeq_DefaultEraseWithCallAttrErase DeeSeq_DefaultEraseWithCallAttrErase
#define LOCAL_DeeSeq_DefaultInsertWithCallAttrInsert DeeSeq_DefaultInsertWithCallAttrInsert
#define LOCAL_DeeSeq_DefaultInsertAllWithCallAttrInsertAll DeeSeq_DefaultInsertAllWithCallAttrInsertAll
Expand Down Expand Up @@ -73,10 +69,6 @@ DECL_BEGIN
#define LOCAL_DeeSeq_DefaultFindWithKeyWithCallAttrFind DeeSeq_DefaultFindWithKeyWithCallFindDataFunction
#define LOCAL_DeeSeq_DefaultRFindWithCallAttrRFind DeeSeq_DefaultRFindWithCallRFindDataFunction
#define LOCAL_DeeSeq_DefaultRFindWithKeyWithCallAttrRFind DeeSeq_DefaultRFindWithKeyWithCallRFindDataFunction
#define LOCAL_DeeSeq_DefaultIndexWithCallAttrIndex DeeSeq_DefaultIndexWithCallIndexDataFunction
#define LOCAL_DeeSeq_DefaultIndexWithKeyWithCallAttrIndex DeeSeq_DefaultIndexWithKeyWithCallIndexDataFunction
#define LOCAL_DeeSeq_DefaultRIndexWithCallAttrRIndex DeeSeq_DefaultRIndexWithCallRIndexDataFunction
#define LOCAL_DeeSeq_DefaultRIndexWithKeyWithCallAttrRIndex DeeSeq_DefaultRIndexWithKeyWithCallRIndexDataFunction
#define LOCAL_DeeSeq_DefaultEraseWithCallAttrErase DeeSeq_DefaultEraseWithCallEraseDataFunction
#define LOCAL_DeeSeq_DefaultInsertWithCallAttrInsert DeeSeq_DefaultInsertWithCallInsertDataFunction
#define LOCAL_DeeSeq_DefaultInsertAllWithCallAttrInsertAll DeeSeq_DefaultInsertAllWithCallInsertAllDataFunction
Expand Down Expand Up @@ -106,10 +98,6 @@ DECL_BEGIN
#define LOCAL_DeeSeq_DefaultFindWithKeyWithCallAttrFind DeeSeq_DefaultFindWithKeyWithCallFindDataMethod
#define LOCAL_DeeSeq_DefaultRFindWithCallAttrRFind DeeSeq_DefaultRFindWithCallRFindDataMethod
#define LOCAL_DeeSeq_DefaultRFindWithKeyWithCallAttrRFind DeeSeq_DefaultRFindWithKeyWithCallRFindDataMethod
#define LOCAL_DeeSeq_DefaultIndexWithCallAttrIndex DeeSeq_DefaultIndexWithCallIndexDataMethod
#define LOCAL_DeeSeq_DefaultIndexWithKeyWithCallAttrIndex DeeSeq_DefaultIndexWithKeyWithCallIndexDataMethod
#define LOCAL_DeeSeq_DefaultRIndexWithCallAttrRIndex DeeSeq_DefaultRIndexWithCallRIndexDataMethod
#define LOCAL_DeeSeq_DefaultRIndexWithKeyWithCallAttrRIndex DeeSeq_DefaultRIndexWithKeyWithCallRIndexDataMethod
#define LOCAL_DeeSeq_DefaultEraseWithCallAttrErase DeeSeq_DefaultEraseWithCallEraseDataMethod
#define LOCAL_DeeSeq_DefaultInsertWithCallAttrInsert DeeSeq_DefaultInsertWithCallInsertDataMethod
#define LOCAL_DeeSeq_DefaultInsertAllWithCallAttrInsertAll DeeSeq_DefaultInsertAllWithCallInsertAllDataMethod
Expand Down Expand Up @@ -139,10 +127,6 @@ DECL_BEGIN
#define LOCAL_DeeSeq_DefaultFindWithKeyWithCallAttrFind DeeSeq_DefaultFindWithKeyWithCallFindDataKwMethod
#define LOCAL_DeeSeq_DefaultRFindWithCallAttrRFind DeeSeq_DefaultRFindWithCallRFindDataKwMethod
#define LOCAL_DeeSeq_DefaultRFindWithKeyWithCallAttrRFind DeeSeq_DefaultRFindWithKeyWithCallRFindDataKwMethod
#define LOCAL_DeeSeq_DefaultIndexWithCallAttrIndex DeeSeq_DefaultIndexWithCallIndexDataKwMethod
#define LOCAL_DeeSeq_DefaultIndexWithKeyWithCallAttrIndex DeeSeq_DefaultIndexWithKeyWithCallIndexDataKwMethod
#define LOCAL_DeeSeq_DefaultRIndexWithCallAttrRIndex DeeSeq_DefaultRIndexWithCallRIndexDataKwMethod
#define LOCAL_DeeSeq_DefaultRIndexWithKeyWithCallAttrRIndex DeeSeq_DefaultRIndexWithKeyWithCallRIndexDataKwMethod
#define LOCAL_DeeSeq_DefaultEraseWithCallAttrErase DeeSeq_DefaultEraseWithCallEraseDataKwMethod
#define LOCAL_DeeSeq_DefaultInsertWithCallAttrInsert DeeSeq_DefaultInsertWithCallInsertDataKwMethod
#define LOCAL_DeeSeq_DefaultInsertAllWithCallAttrInsertAll DeeSeq_DefaultInsertAllWithCallInsertAllDataKwMethod
Expand Down Expand Up @@ -250,54 +234,6 @@ err:
return (size_t)-1;
}

INTERN WUNUSED NONNULL((1, 2)) size_t DCALL
LOCAL_DeeSeq_DefaultIndexWithCallAttrIndex(DeeObject *self, DeeObject *item, size_t start, size_t end) {
DREF DeeObject *result;
result = LOCAL_DeeObject_CallAttrf(self, tsc_index_data, &str_index, "o" PCKuSIZ PCKuSIZ, item, start, end);
if unlikely(!result)
goto err;
Dee_Decref(result);
return 0;
err:
return (size_t)-1;
}

INTERN WUNUSED NONNULL((1, 2, 5)) size_t DCALL
LOCAL_DeeSeq_DefaultIndexWithKeyWithCallAttrIndex(DeeObject *self, DeeObject *item, size_t start, size_t end, DeeObject *key) {
DREF DeeObject *result;
result = LOCAL_DeeObject_CallAttrf(self, tsc_index_data, &str_index, "o" PCKuSIZ PCKuSIZ "o", item, start, end, key);
if unlikely(!result)
goto err;
Dee_Decref(result);
return 0;
err:
return (size_t)-1;
}

INTERN WUNUSED NONNULL((1, 2)) size_t DCALL
LOCAL_DeeSeq_DefaultRIndexWithCallAttrRIndex(DeeObject *self, DeeObject *item, size_t start, size_t end) {
DREF DeeObject *result;
result = LOCAL_DeeObject_CallAttrf(self, tsc_rindex_data, &str_rindex, "o" PCKuSIZ PCKuSIZ, item, start, end);
if unlikely(!result)
goto err;
Dee_Decref(result);
return 0;
err:
return (size_t)-1;
}

INTERN WUNUSED NONNULL((1, 2, 5)) size_t DCALL
LOCAL_DeeSeq_DefaultRIndexWithKeyWithCallAttrRIndex(DeeObject *self, DeeObject *item, size_t start, size_t end, DeeObject *key) {
DREF DeeObject *result;
result = LOCAL_DeeObject_CallAttrf(self, tsc_rindex_data, &str_rindex, "o" PCKuSIZ PCKuSIZ "o", item, start, end, key);
if unlikely(!result)
goto err;
Dee_Decref(result);
return 0;
err:
return (size_t)-1;
}

INTERN WUNUSED NONNULL((1)) int DCALL
LOCAL_DeeSeq_DefaultEraseWithCallAttrErase(DeeObject *self, size_t index, size_t count) {
DREF DeeObject *result;
Expand Down Expand Up @@ -620,10 +556,6 @@ LOCAL_DeeSeq_DefaultSortedWithKeyWithCallAttrSorted(DeeObject *self, size_t star
#undef LOCAL_DeeSeq_DefaultFindWithKeyWithCallAttrFind
#undef LOCAL_DeeSeq_DefaultRFindWithCallAttrRFind
#undef LOCAL_DeeSeq_DefaultRFindWithKeyWithCallAttrRFind
#undef LOCAL_DeeSeq_DefaultIndexWithCallAttrIndex
#undef LOCAL_DeeSeq_DefaultIndexWithKeyWithCallAttrIndex
#undef LOCAL_DeeSeq_DefaultRIndexWithCallAttrRIndex
#undef LOCAL_DeeSeq_DefaultRIndexWithKeyWithCallAttrRIndex
#undef LOCAL_DeeSeq_DefaultEraseWithCallAttrErase
#undef LOCAL_DeeSeq_DefaultInsertWithCallAttrInsert
#undef LOCAL_DeeSeq_DefaultInsertAllWithCallAttrInsertAll
Expand Down
64 changes: 0 additions & 64 deletions src/deemon/objects/seq/default-api-methods-require-impl.c.inl
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
//#define DEFINE_DeeType_SeqCache_RequireFindWithKey
//#define DEFINE_DeeType_SeqCache_RequireRFind
//#define DEFINE_DeeType_SeqCache_RequireRFindWithKey
//#define DEFINE_DeeType_SeqCache_RequireIndex
//#define DEFINE_DeeType_SeqCache_RequireIndexWithKey
//#define DEFINE_DeeType_SeqCache_RequireRIndex
//#define DEFINE_DeeType_SeqCache_RequireRIndexWithKey
//#define DEFINE_DeeType_SeqCache_RequireErase
//#define DEFINE_DeeType_SeqCache_RequireInsert
//#define DEFINE_DeeType_SeqCache_RequireInsertAll
Expand Down Expand Up @@ -57,10 +53,6 @@
defined(DEFINE_DeeType_SeqCache_RequireFindWithKey) + \
defined(DEFINE_DeeType_SeqCache_RequireRFind) + \
defined(DEFINE_DeeType_SeqCache_RequireRFindWithKey) + \
defined(DEFINE_DeeType_SeqCache_RequireIndex) + \
defined(DEFINE_DeeType_SeqCache_RequireIndexWithKey) + \
defined(DEFINE_DeeType_SeqCache_RequireRIndex) + \
defined(DEFINE_DeeType_SeqCache_RequireRIndexWithKey) + \
defined(DEFINE_DeeType_SeqCache_RequireErase) + \
defined(DEFINE_DeeType_SeqCache_RequireInsert) + \
defined(DEFINE_DeeType_SeqCache_RequireInsertAll) + \
Expand Down Expand Up @@ -130,46 +122,6 @@ DECL_BEGIN
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataMethod DeeSeq_DefaultRFindWithKeyWithCallRFindDataMethod
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataKwMethod DeeSeq_DefaultRFindWithKeyWithCallRFindDataKwMethod
#define LOCAL_DeeSeq_DefaultFooWithError DeeSeq_DefaultRFindWithKeyWithEnumerateIndex
#elif defined(DEFINE_DeeType_SeqCache_RequireIndex)
#define LOCAL_CANONICAL_NAME index
#define LOCAL_generic_seq_foo generic_seq_index
#define LOCAL_tsc_foo tsc_index
#define LOCAL_DeeType_SeqCache_RequireFoo DeeType_SeqCache_RequireIndex
#define LOCAL_DeeSeq_DefaultFooWithCallAttrFoo DeeSeq_DefaultIndexWithCallAttrIndex
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataFunction DeeSeq_DefaultIndexWithCallIndexDataFunction
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataMethod DeeSeq_DefaultIndexWithCallIndexDataMethod
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataKwMethod DeeSeq_DefaultIndexWithCallIndexDataKwMethod
#define LOCAL_DeeSeq_DefaultFooWithError DeeSeq_DefaultIndexWithTSCFind
#elif defined(DEFINE_DeeType_SeqCache_RequireIndexWithKey)
#define LOCAL_CANONICAL_NAME index
#define LOCAL_generic_seq_foo generic_seq_index
#define LOCAL_tsc_foo tsc_index_with_key
#define LOCAL_DeeType_SeqCache_RequireFoo DeeType_SeqCache_RequireIndexWithKey
#define LOCAL_DeeSeq_DefaultFooWithCallAttrFoo DeeSeq_DefaultIndexWithKeyWithCallAttrIndex
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataFunction DeeSeq_DefaultIndexWithKeyWithCallIndexDataFunction
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataMethod DeeSeq_DefaultIndexWithKeyWithCallIndexDataMethod
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataKwMethod DeeSeq_DefaultIndexWithKeyWithCallIndexDataKwMethod
#define LOCAL_DeeSeq_DefaultFooWithError DeeSeq_DefaultIndexWithKeyWithTSCFindWithKey
#elif defined(DEFINE_DeeType_SeqCache_RequireRIndex)
#define LOCAL_CANONICAL_NAME rindex
#define LOCAL_generic_seq_foo generic_seq_rindex
#define LOCAL_tsc_foo tsc_rindex
#define LOCAL_DeeType_SeqCache_RequireFoo DeeType_SeqCache_RequireRIndex
#define LOCAL_DeeSeq_DefaultFooWithCallAttrFoo DeeSeq_DefaultRIndexWithCallAttrRIndex
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataFunction DeeSeq_DefaultRIndexWithCallRIndexDataFunction
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataMethod DeeSeq_DefaultRIndexWithCallRIndexDataMethod
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataKwMethod DeeSeq_DefaultRIndexWithCallRIndexDataKwMethod
#define LOCAL_DeeSeq_DefaultFooWithError DeeSeq_DefaultRIndexWithTSCRFind
#elif defined(DEFINE_DeeType_SeqCache_RequireRIndexWithKey)
#define LOCAL_CANONICAL_NAME rindex
#define LOCAL_generic_seq_foo generic_seq_rindex
#define LOCAL_tsc_foo tsc_rindex_with_key
#define LOCAL_DeeType_SeqCache_RequireFoo DeeType_SeqCache_RequireRIndexWithKey
#define LOCAL_DeeSeq_DefaultFooWithCallAttrFoo DeeSeq_DefaultRIndexWithKeyWithCallAttrRIndex
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataFunction DeeSeq_DefaultRIndexWithKeyWithCallRIndexDataFunction
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataMethod DeeSeq_DefaultRIndexWithKeyWithCallRIndexDataMethod
#define LOCAL_DeeSeq_DefaultFooWithCallFooDataKwMethod DeeSeq_DefaultRIndexWithKeyWithCallRIndexDataKwMethod
#define LOCAL_DeeSeq_DefaultFooWithError DeeSeq_DefaultRIndexWithKeyWithTSCRFindWithKey
#elif defined(DEFINE_DeeType_SeqCache_RequireErase)
#define LOCAL_CANONICAL_NAME erase
#define LOCAL_generic_seq_foo generic_seq_erase
Expand Down Expand Up @@ -484,18 +436,6 @@ LOCAL_DeeType_SeqCache_RequireFoo_private_uncached(DeeTypeObject *orig_type, Dee
#elif defined(DEFINE_DeeType_SeqCache_RequireRFindWithKey)
if (DeeType_SeqCache_TryRequireEnumerateIndexReverse(self))
return &DeeSeq_DefaultRFindWithKeyWithTSCEnumerateIndexReverse;
#elif defined(DEFINE_DeeType_SeqCache_RequireIndex)
if (DeeType_SeqCache_RequireFind_private_uncached(orig_type, self))
return &DeeSeq_DefaultIndexWithTSCFind;
#elif defined(DEFINE_DeeType_SeqCache_RequireIndexWithKey)
if (DeeType_SeqCache_RequireFindWithKey_private_uncached(orig_type, self))
return &DeeSeq_DefaultIndexWithKeyWithTSCFindWithKey;
#elif defined(DEFINE_DeeType_SeqCache_RequireRIndex)
if (DeeType_SeqCache_RequireRFind_private_uncached(orig_type, self))
return &DeeSeq_DefaultRIndexWithTSCRFind;
#elif defined(DEFINE_DeeType_SeqCache_RequireRIndexWithKey)
if (DeeType_SeqCache_RequireRFindWithKey_private_uncached(orig_type, self))
return &DeeSeq_DefaultRIndexWithKeyWithTSCRFindWithKey;
#elif defined(DEFINE_DeeType_SeqCache_RequireErase)
if (DeeType_HasPrivateOperator(self, OPERATOR_DELRANGE))
return &DeeSeq_DefaultEraseWithDelRangeIndex;
Expand Down Expand Up @@ -901,10 +841,6 @@ DECL_END
#undef DEFINE_DeeType_SeqCache_RequireFindWithKey
#undef DEFINE_DeeType_SeqCache_RequireRFind
#undef DEFINE_DeeType_SeqCache_RequireRFindWithKey
#undef DEFINE_DeeType_SeqCache_RequireIndex
#undef DEFINE_DeeType_SeqCache_RequireIndexWithKey
#undef DEFINE_DeeType_SeqCache_RequireRIndex
#undef DEFINE_DeeType_SeqCache_RequireRIndexWithKey
#undef DEFINE_DeeType_SeqCache_RequireErase
#undef DEFINE_DeeType_SeqCache_RequireInsert
#undef DEFINE_DeeType_SeqCache_RequireInsertAll
Expand Down
Loading

0 comments on commit b5626c7

Please sign in to comment.