mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
gh-123881: make compiler add the .generic_base base class without constructing AST nodes (#123883)
This commit is contained in:
parent
3597642ed5
commit
a2d0818c85
3 changed files with 52 additions and 47 deletions
|
@ -88,7 +88,6 @@ typedef struct _PyCompiler {
|
|||
including names tuple */
|
||||
struct compiler_unit *u; /* compiler state for current block */
|
||||
PyObject *c_stack; /* Python list holding compiler_unit ptrs */
|
||||
PyArena *c_arena; /* pointer to memory allocation arena */
|
||||
|
||||
bool c_save_nested_seqs; /* if true, construct recursive instruction sequences
|
||||
* (including instructions for nested code objects)
|
||||
|
@ -112,7 +111,6 @@ compiler_setup(compiler *c, mod_ty mod, PyObject *filename,
|
|||
}
|
||||
|
||||
c->c_filename = Py_NewRef(filename);
|
||||
c->c_arena = arena;
|
||||
if (!_PyFuture_FromAST(mod, filename, &c->c_future)) {
|
||||
return ERROR;
|
||||
}
|
||||
|
@ -1244,12 +1242,6 @@ _PyCompile_Metadata(compiler *c)
|
|||
return &c->u->u_metadata;
|
||||
}
|
||||
|
||||
PyArena *
|
||||
_PyCompile_Arena(compiler *c)
|
||||
{
|
||||
return c->c_arena;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
int
|
||||
_PyCompile_IsTopLevelAwait(compiler *c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue