Skip to content

Commit a5e69d5

Browse files
author
Anselm Kruis
committed
Stackless issue python#283: Concentrate platform code in slp_transfer.c
Remove commented code.
1 parent 24acb96 commit a5e69d5

File tree

7 files changed

+0
-41
lines changed

7 files changed

+0
-41
lines changed

Include/internal/pycore_slp_platformselect.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,4 @@
7070
#define SLP_CSTACK_SUBTRACT(a, b) (b) - (a)
7171
#endif
7272

73-
#define SLP_CSTACK_SAVE_NOW_to_be_deleted(tstate, stackvar) \
74-
((tstate)->st.cstack_root != NULL ? \
75-
SLP_CSTACK_SUBTRACT((tstate)->st.cstack_root, \
76-
(intptr_t*)&(stackvar)) > SLP_CSTACK_WATERMARK : 1)
77-
7873
#endif /* !STACKLESS_SLP_PLATFORM_SELECT_H */

Python/ceval.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "setobject.h"
2323
#include "structmember.h"
2424
#include "pycore_stackless.h"
25-
// #include "pycore_slp_platformselect.h" /* for stack saving */
2625

2726
#include <ctype.h>
2827

Stackless/core/stacklesseval.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
#include "pycore_stackless.h"
99
#include "pycore_slp_prickelpit.h"
1010

11-
/* platform specific constants */
12-
//#include "pycore_slp_platformselect.h"
13-
1411
/* Stackless extension for ceval.c */
1512

1613

@@ -243,32 +240,6 @@ make_initial_stub(void)
243240
return result;
244241
}
245242

246-
//static PyObject *
247-
//climb_stack_and_eval_frame(PyFrameObject *f)
248-
//{
249-
// /*
250-
// * a similar case to climb_stack_and_transfer,
251-
// * but here we need to incorporate a gap in the
252-
// * stack into main and keep this gap on the stack.
253-
// * This way, initial_stub is always valid to be
254-
// * used to return to the main c stack.
255-
// */
256-
// PyThreadState *ts = _PyThreadState_GET();
257-
// intptr_t probe;
258-
// ptrdiff_t needed = &probe - ts->st.cstack_base;
259-
// /* in rare cases, the need might have vanished due to the recursion */
260-
// if (needed > 0) {
261-
// register void * stack_ptr_tmp = alloca(needed * sizeof(intptr_t));
262-
// if (stack_ptr_tmp == NULL)
263-
// return NULL;
264-
// /* hinder the compiler to optimise away
265-
// stack_ptr_tmp and the alloca call.
266-
// This happens with gcc 4.7.x and -O2 */
267-
// SLP_DO_NOT_OPTIMIZE_AWAY(stack_ptr_tmp);
268-
// }
269-
// return slp_eval_frame(f);
270-
//}
271-
272243
static PyObject * slp_frame_dispatch_top(PyObject *retval);
273244

274245
static PyObject *

Stackless/module/scheduling.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#ifdef STACKLESS
77
#include "pycore_stackless.h"
8-
// #include "pycore_slp_platformselect.h" /* for SLP_DO_NOT_OPTIMIZE_AWAY */
98

109
/******************************************************
1110

Stackless/module/stacklessmodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include "pycore_stackless.h"
88

99
#define IMPLEMENT_STACKLESSMODULE
10-
// #include "pycore_slp_platformselect.h"
1110
#include "pycore_slp_prickelpit.h"
1211
#include <stddef.h> /* for offsetof() */
1312

Stackless/pickling/prickelpit.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
#include "pycore_stackless.h"
88
#include "pycore_slp_prickelpit.h"
99

10-
/* platform specific constants */
11-
// #include "pycore_slp_platformselect.h"
12-
1310
/******************************************************
1411
1512
type template and support for pickle helper types

Stackless/pickling/safe_pickle.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#define SLP_BUILD_CORE
77
#include "pycore_stackless.h"
8-
// #include "pycore_slp_platformselect.h"
98

109
/* safe pickling */
1110

0 commit comments

Comments
 (0)