Skip to content

Commit 5f881d9

Browse files
committed
pythongh-93678: inline a few compiler functions to reverse the recent increase in recurion depth
1 parent 0fe645d commit 5f881d9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Python/compile.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -866,13 +866,13 @@ cfg_builder_use_next_block(cfg_builder *g, basicblock *block)
866866
return block;
867867
}
868868

869-
static basicblock *
869+
static inline basicblock *
870870
compiler_new_block(struct compiler *c)
871871
{
872872
return cfg_builder_new_block(CFG_BUILDER(c));
873873
}
874874

875-
static basicblock *
875+
static inline basicblock *
876876
compiler_use_next_block(struct compiler *c, basicblock *block)
877877
{
878878
return cfg_builder_use_next_block(CFG_BUILDER(c), block);
@@ -1252,7 +1252,7 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg)
12521252
Returns 0 on failure, 1 on success.
12531253
*/
12541254

1255-
static int
1255+
static inline int
12561256
basicblock_addop(basicblock *b, int opcode, int oparg,
12571257
basicblock *target, struct location loc)
12581258
{
@@ -1278,7 +1278,7 @@ basicblock_addop(basicblock *b, int opcode, int oparg,
12781278
return 1;
12791279
}
12801280

1281-
static int
1281+
static inline int
12821282
cfg_builder_addop(cfg_builder *g, int opcode, int oparg, basicblock *target,
12831283
struct location loc)
12841284
{
@@ -1293,7 +1293,7 @@ cfg_builder_addop(cfg_builder *g, int opcode, int oparg, basicblock *target,
12931293
return basicblock_addop(g->curblock, opcode, oparg, target, loc);
12941294
}
12951295

1296-
static int
1296+
static inline int
12971297
cfg_builder_addop_noarg(cfg_builder *g, int opcode, struct location loc)
12981298
{
12991299
assert(!HAS_ARG(opcode));

0 commit comments

Comments
 (0)