Skip to content

Commit bc12b72

Browse files
authored
gh-158572: Add an external flag to interpreter frames (#158573)
Adds an `external` flag to a bit-packed byte on the _PyInterpreterFrame struct in order to provide external frame evaluators a way to distinguish VM-pushed frames vs externally- pushed frames.
1 parent 5607381 commit bc12b72

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎Include/internal/pycore_interpframe_structs.h‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@ struct _PyInterpreterFrame {
4242
#endif
4343
uint16_t return_offset; /* Only relevant during a function call */
4444
char owner;
45-
#ifdef Py_DEBUG
4645
uint8_t visited:1;
46+
uint8_t external:1; /* Set when the frame was pushed by something other than the VM */
47+
#ifdef Py_DEBUG
4748
uint8_t stackpointer_valid:1;
48-
uint8_t lltrace:6;
49-
#else
50-
uint8_t visited;
49+
uint8_t lltrace:5;
5150
#endif
5251
/* Locals and stack */
5352
_PyStackRef localsplus[1];

0 commit comments

Comments
 (0)