Skip to content

Commit 312fd30

Browse files
committed
Remove list arg
1 parent 7befc01 commit 312fd30

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Python/flowgraph.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,11 +1400,12 @@ static int
14001400
optimize_const_sequence(PyObject *const_cache,
14011401
cfg_instr* inst,
14021402
int n, PyObject *consts,
1403-
int list, int build, int extend)
1403+
int build, int extend)
14041404
{
14051405
assert(PyDict_CheckExact(const_cache));
14061406
assert(PyList_CheckExact(consts));
14071407
assert(inst[n].i_oparg == n);
1408+
int list = build == BUILD_LIST;
14081409
if (list) {
14091410
assert(inst[n].i_opcode == BUILD_LIST);
14101411
}
@@ -1817,14 +1818,14 @@ optimize_basic_block(PyObject *const_cache, basicblock *bb, PyObject *consts)
18171818
break;
18181819
case BUILD_LIST:
18191820
if (i >= oparg) {
1820-
if (optimize_const_sequence(const_cache, inst-oparg, oparg, consts, 1, BUILD_LIST, LIST_EXTEND)) {
1821+
if (optimize_const_sequence(const_cache, inst-oparg, oparg, consts, BUILD_LIST, LIST_EXTEND)) {
18211822
goto error;
18221823
}
18231824
}
18241825
break;
18251826
case BUILD_SET:
18261827
if (i >= oparg) {
1827-
if (optimize_const_sequence(const_cache, inst-oparg, oparg, consts, 0, BUILD_SET, SET_UPDATE)) {
1828+
if (optimize_const_sequence(const_cache, inst-oparg, oparg, consts, BUILD_SET, SET_UPDATE)) {
18281829
goto error;
18291830
}
18301831
}

0 commit comments

Comments
 (0)