8000 DCE hack · python/cpython@4405a5c · GitHub
[go: up one dir, main page]

Skip to content

Commit 4405a5c

Browse files
DCE hack
1 parent 8274425 commit 4405a5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Python/ceval_macros.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,9 @@ do { \
459459
PyObject **NAME = _PyObjectArray_FromStackRefArray(ARGS, ARG_COUNT, NAME##_temp);
460460
#else
461461
#define STACKREFS_TO_PYOBJECTS(ARGS, ARG_COUNT, NAME) \
462-
PyObject **NAME = (PyObject **)ARGS;
462+
PyObject **NAME = (PyObject **)ARGS; \
463+
/* This hopefully hints to the compiler to DCE the NULL check for error */ \
464+
assert(NAME != NULL);
463465
#endif
464466

465467
#ifdef Py_GIL_DISABLED

0 commit comments

Comments
 (0)
0