summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-28 18:56:37 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-28 18:56:37 (GMT)
commit3d85fae91f82f27d239b51098fa90eee9d812ae4 (patch)
treee6b004489e495eecaaf9d53a3c0b1682736163aa /Python/compile.c
parentb69ee8c38642a4efd0b880f0c8651010aa7883b9 (diff)
downloadcpython-3d85fae91f82f27d239b51098fa90eee9d812ae4.zip
cpython-3d85fae91f82f27d239b51098fa90eee9d812ae4.tar.gz
cpython-3d85fae91f82f27d239b51098fa90eee9d812ae4.tar.bz2
Issue #28823: Simplified compiling with opcode BUILD_MAP_UNPACK.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 46a40a3..62f1c3f 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -3344,11 +3344,8 @@ compiler_dict(struct compiler *c, expr_ty e)
/* If there is more than one dict, they need to be merged into a new
* dict. If there is one dict and it's an unpacking, then it needs
* to be copied into a new dict." */
- while (containers > 1 || is_unpacking) {
- int oparg = containers < 255 ? containers : 255;
- ADDOP_I(c, BUILD_MAP_UNPACK, oparg);
- containers -= (oparg - 1);
- is_unpacking = 0;
+ if (containers > 1 || is_unpacking) {
+ ADDOP_I(c, BUILD_MAP_UNPACK, containers);
}
return 1;
}