<commit_before>#ifndef Py_SYMTABLE_H
#define Py_SYMTABLE_H
#ifdef __cplusplus
extern "C" {
#endif

typedef enum _block_type { FunctionBlock, ClassBlock, ModuleBlock }
    _Py_block_ty;

struct _symtable_entry;

struct symtable {
	const char *st_filename; /* name of file being compiled */
	struct _symtable_entry *st_cur; /* current symbol table entry */
	struct _symtable_entry *st_top; /* module entry */
	PyObject *st_symbols;    /* dictionary of symbol table entries */
        PyObject *st_stack;      /* stack of namespace info */
	PyObject *st_global;     /* borrowed ref to MODULE in st_symbols */
	int st_nblocks;          /* number of blocks */
	PyObject *st_private;        /* name of current class or NULL */
        int st_tmpname;          /* temporary name counter */
	PyFutureFeatures *st_future; /* module's future features */
};

typedef struct _symtable_entry {
	PyObject_HEAD
	PyObject *ste_id;        /* int: key in st_symbols */
	PyObject *ste_symbols;   /* dict: name to flags */
	PyObject *ste_name;      /* string: name of block */
	PyObject *ste_varnames;  /* list of variable names */
	PyObject *ste_children;  /* list of child ids */
	_Py_block_ty ste_type;   /* module, class, or function */
	int ste_unoptimized;     /* false if namespace is optimized */
	int ste_nested : 1;      /* true if block is nested */
	int ste_free : 1;        /* true if block has free variables */
	int ste_child_free : 1;  /* true if a child block has free variables,
				    including free refs to globals */
	int ste_generator : 1;   /* true if namespace is a generator */
	int ste_varargs : 1;     /* true if block has varargs */
	int ste_varkeywords : 1; /* true if block has varkeywords */
	int ste_lineno;          /* first line of block */
	int ste_opt_lineno;      /* lineno of last exec or import * */
	int ste_tmpname;         /* counter for listcomp temp vars */
	struct symtable *ste_table;
} PySTEntryObject;

PyAPI_DATA(PyTypeObject) PySTEntry_Type;

#define PySTEntry_Check(op) ((op)->ob_type == &PySTEntry_Type)

PyAPI_FUNC(PySTEntryObject *) \
	PySTEntry_New(struct symtable *, identifier, _Py_block_ty, void *, int);
PyAPI_FUNC(int) PyST_GetScope(PySTEntryObject *, PyObject *);

PyAPI_FUNC(struct symtable *) PySymtable_Build(mod_ty, const char *, 
					      PyFutureFeatures *);
PyAPI_FUNC(PySTEntryObject *) PySymtable_Lookup(struct symtable *, void *);

PyAPI_FUNC(void) PySymtable_Free(struct symtable *);

/* Flags for def-use information */

#define DEF_GLOBAL 1           /* global stmt */
#define DEF_LOCAL 2            /* assignment in code block */<commit_msg>Fix icc warnings: single bit fields should be unsigned<commit_after>#ifndef Py_SYMTABLE_H
#define Py_SYMTABLE_H
#ifdef __cplusplus
extern "C" {
#endif

typedef enum _block_type { FunctionBlock, ClassBlock, ModuleBlock }
    _Py_block_ty;

struct _symtable_entry;

struct symtable {
	const char *st_filename; /* name of file being compiled */
	struct _symtable_entry *st_cur; /* current symbol table entry */
	struct _symtable_entry *st_top; /* module entry */
	PyObject *st_symbols;    /* dictionary of symbol table entries */
        PyObject *st_stack;      /* stack of namespace info */
	PyObject *st_global;     /* borrowed ref to MODULE in st_symbols */
	int st_nblocks;          /* number of blocks */
	PyObject *st_private;        /* name of current class or NULL */
        int st_tmpname;          /* temporary name counter */
	PyFutureFeatures *st_future; /* module's future features */
};

typedef struct _symtable_entry {
	PyObject_HEAD
	PyObject *ste_id;        /* int: key in st_symbols */
	PyObject *ste_symbols;   /* dict: name to flags */
	PyObject *ste_name;      /* string: name of block */
	PyObject *ste_varnames;  /* list of variable names */
	PyObject *ste_children;  /* list of child ids */
	_Py_block_ty ste_type;   /* module, class, or function */
	int ste_unoptimized;     /* false if namespace is optimized */
	unsigned ste_nested : 1;      /* true if block is nested */
	unsigned ste_free : 1;        /* true if block has free variables */
	unsigned ste_child_free : 1;  /* true if a child block has free vars,
				         including free refs to globals */
	unsigned ste_generator : 1;   /* true if namespace is a generator */
	unsigned ste_varargs : 1;     /* true if block has varargs */
	unsigned ste_varkeywords : 1; /* true if block has varkeywords */
	int ste_lineno;          /* first line of block */
	int ste_opt_lineno;      /* lineno of last exec or import * */
	int ste_tmpname;         /* counter for listcomp temp vars */
	struct symtable *ste_table;
} PySTEntryObject;

PyAPI_DATA(PyTypeObject) PySTEntry_Type;

#define PySTEntry_Check(op) ((op)->ob_type == &PySTEntry_Type)

PyAPI_FUNC(PySTEntryObject *) \
	PySTEntry_New(struct symtable *, identifier, _Py_block_ty, void *, int);
PyAPI_FUNC(int) PyST_GetScope(PySTEntryObject *, PyObject *);

PyAPI_FUNC(struct symtable *) PySymtable_Build(mod_ty, const char *, 
					      PyFutureFeatures *);
PyAPI_FUNC(PySTEntryObject *) PySymtable_Lookup(struct symtable *, void *);

PyAPI_FUNC(void) PySymtable_Free(struct symtable *);

/* Flags for def-use information */

#define DEF_GLOBAL 1           /* global stmt */
#define DEF_LOCAL 2            /* assignment in code block */
{'fraction_non_alphanumeric': 0.09774150692731068, 'fraction_numerical': 0.0030366293414310114, 'mean_word_length': 3.3126022913256956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4395137', 'n_tokens_mistral': 1663, 'n_tokens_neox': 1624, 'n_words': 526}