Skip to content

Commit

Permalink
Explain members of Symbol type
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Feb 27, 2024
1 parent ef31003 commit 13a60a8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Include/internal/pycore_optimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ extern PyTypeObject _PyUOpOptimizer_Type;
/* See explanation in optimizer_symbols.c */

struct _Py_UopsSymbol {
int flags;
PyTypeObject *typ;
// constant propagated value (might be NULL)
PyObject *const_val;
int flags; // 0 bits: Top; 2 or more bits: Bottom
PyTypeObject *typ; // Borrowed reference
PyObject *const_val; // Owned reference (!)
};

// Holds locals, stack, locals, stack ... co_consts (in that order)
Expand Down

0 comments on commit 13a60a8

Please sign in to comment.