@@ -863,6 +863,7 @@ PRIVATE DEFINE_STRING(main_thread_name, "MainThread");
863863PUBLIC uint16_t DeeExec_StackLimit = Dee_EXEC_DEFAULT_STACK_LIMIT ;
864864
865865
866+ #ifndef CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR
866867PRIVATE struct Dee_deep_assoc_entry empty_deep_assoc [] = {
867868 { NULL , NULL }
868869};
@@ -1040,6 +1041,7 @@ deepcopy_clear(struct Dee_thread_object *__restrict thread_self) {
10401041 Dee_Free (begin );
10411042 }
10421043}
1044+ #endif /* !CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR */
10431045
10441046
10451047typedef struct os_thread_object {
@@ -1158,7 +1160,9 @@ INTERN DeeOSThreadObject DeeThread_Main = {
11581160 /* .t_str_curr = */ NULL ,
11591161 /* .t_repr_curr = */ NULL ,
11601162 /* .t_hash_curr = */ NULL ,
1163+ #ifndef CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR
11611164 /* .t_deepassoc = */ { 0 , 0 , empty_deep_assoc , 0 },
1165+ #endif /* !CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR */
11621166 /* .t_exec = */ NULL ,
11631167 /* .t_except = */ NULL ,
11641168 /* .t_execsz = */ 0 ,
@@ -1793,7 +1797,9 @@ DeeThread_AllocateCurrentThread(void) {
17931797 if unlikely (result == NULL )
17941798 return NULL ;
17951799 DeeObject_Init (& result -> at_os_thread .ot_thread , & DeeThread_Type );
1800+ #ifndef CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR
17961801 result -> at_os_thread .ot_thread .t_deepassoc .da_list = empty_deep_assoc ;
1802+ #endif /* !CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR */
17971803
17981804 /* Set expected thread flags. */
17991805 result -> at_os_thread .ot_thread .t_state = 0 |
@@ -1962,9 +1968,11 @@ DeeThread_Secede(DREF DeeObject *thread_result) {
19621968 ASSERTF (self -> t_str_curr == NULL , "Calling thread still has active calls to `DeeObject_Str'" );
19631969 ASSERTF (self -> t_repr_curr == NULL , "Calling thread still has active calls to `DeeObject_Repr'" );
19641970 ASSERTF (self -> t_hash_curr == NULL , "Calling thread still has active calls to `DeeObject_Hash'" );
1971+ #ifndef CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR
19651972 ASSERTF (self -> t_deepassoc .da_used == 0 , "Calling thread still has active calls to `DeeObject_DeepCopy'" );
19661973 ASSERT ((self -> t_deepassoc .da_mask != 0 ) ==
19671974 (self -> t_deepassoc .da_list != empty_deep_assoc ));
1975+ #endif /* !CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR */
19681976 ASSERT (!self -> t_threadname || DeeString_Check (self -> t_threadname ));
19691977
19701978 /* Set the TERMINATING flag to prevent further interrupts from being scheduled. */
@@ -2199,12 +2207,14 @@ INTERN void DCALL DeeThread_SubSystemFini(void) {
21992207 /* Finalize the main-thread object */
22002208 _DeeThread_FiniMainThread ();
22012209
2210+ #ifndef CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR
22022211 /* Do some cleanup on the main-thread object */
22032212 if (DeeThread_Main .ot_thread .t_deepassoc .da_list != empty_deep_assoc )
22042213 Dee_Free (DeeThread_Main .ot_thread .t_deepassoc .da_list );
22052214 DeeThread_Main .ot_thread .t_deepassoc .da_used = 0 ;
22062215 DeeThread_Main .ot_thread .t_deepassoc .da_mask = 0 ;
22072216 DeeThread_Main .ot_thread .t_deepassoc .da_list = empty_deep_assoc ;
2217+ #endif /* !CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR */
22082218
22092219 DBG_ALIGNMENT_ENABLE ();
22102220}
@@ -3578,9 +3588,11 @@ thread_fini(DeeThreadObject *__restrict self) {
35783588#ifndef CONFIG_NO_THREADS
35793589 ASSERT (!LIST_ISBOUND (self , t_global ));
35803590#endif /* !CONFIG_NO_THREADS */
3591+ #ifndef CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR
35813592 ASSERT (self -> t_deepassoc .da_used == 0 );
35823593 ASSERT (self -> t_deepassoc .da_mask == 0 );
35833594 ASSERT (self -> t_deepassoc .da_list == empty_deep_assoc );
3595+ #endif /* !CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR */
35843596#ifndef CONFIG_NO_THREADS
35853597 ASSERT (self -> t_threadname == NULL );
35863598#endif /* !CONFIG_NO_THREADS */
@@ -3605,11 +3617,13 @@ thread_fini(DeeThreadObject *__restrict self) {
36053617#endif /* !... */
36063618 }
36073619
3620+ #ifndef CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR
36083621 ASSERT (!self -> t_deepassoc .da_used );
36093622 ASSERT ((self -> t_deepassoc .da_mask != 0 ) ==
36103623 (self -> t_deepassoc .da_list != empty_deep_assoc ));
36113624 if (self -> t_deepassoc .da_list != empty_deep_assoc )
36123625 Dee_Free (self -> t_deepassoc .da_list );
3626+ #endif /* !CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR */
36133627 Dee_XDecref (self -> t_threadname );
36143628 if (self -> t_state & Dee_THREAD_STATE_STARTED ) {
36153629 if (self -> t_state & Dee_THREAD_STATE_TERMINATED ) {
@@ -3653,7 +3667,9 @@ PUBLIC WUNUSED DREF DeeObject *DCALL DeeThread_FromTid(Dee_pid_t tid) {
36533667 Dee_THREAD_STATE_HASTID |
36543668 Dee_THREAD_STATE_UNMANAGED ;
36553669 result -> ot_tid = tid ;
3670+ #ifndef CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR
36563671 result -> ot_thread .t_deepassoc .da_list = empty_deep_assoc ;
3672+ #endif /* !CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR */
36573673 DeeObject_Init (& result -> ot_thread , & DeeThread_Type );
36583674 return DeeGC_Track (Dee_AsObject (& result -> ot_thread ));
36593675err :
@@ -3851,10 +3867,12 @@ thread_init(DeeThreadObject *__restrict self,
38513867 me -> ot_thread .t_str_curr = NULL ;
38523868 me -> ot_thread .t_repr_curr = NULL ;
38533869 me -> ot_thread .t_hash_curr = NULL ;
3870+ #ifndef CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR
38543871 me -> ot_thread .t_deepassoc .da_used = 0 ;
38553872 me -> ot_thread .t_deepassoc .da_mask = 0 ;
38563873 me -> ot_thread .t_deepassoc .da_list = empty_deep_assoc ;
38573874 me -> ot_thread .t_deepassoc .da_recursion = 0 ;
3875+ #endif /* !CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR */
38583876 me -> ot_thread .t_exec = NULL ;
38593877 me -> ot_thread .t_except = NULL ;
38603878 me -> ot_thread .t_execsz = 0 ;
@@ -3938,10 +3956,12 @@ thread_init(DeeThreadObject *__restrict self,
39383956 self -> t_interrupt .ti_args = NULL ;
39393957 self -> t_global .le_prev = NULL ;
39403958 DBG_memset (& self -> t_global .le_next , 0xcc , sizeof (self -> t_global .le_next ));
3959+ #ifndef CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR
39413960 self -> t_deepassoc .da_used = 0 ;
39423961 self -> t_deepassoc .da_mask = 0 ;
39433962 self -> t_deepassoc .da_list = empty_deep_assoc ;
39443963 self -> t_deepassoc .da_recursion = 0 ;
3964+ #endif /* !CONFIG_EXPERIMENTAL_SERIALIZE_OPERATOR */
39453965#ifdef CONFIG_EXPERIMENTAL_CUSTOM_HEAP
39463966 self -> t_heap = NULL ;
39473967#endif /* CONFIG_EXPERIMENTAL_CUSTOM_HEAP */
0 commit comments