Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3d85fae

Browse files
Issue #28823: Simplified compiling with opcode BUILD_MAP_UNPACK.
1 parent b69ee8c commit 3d85fae

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Python/compile.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3344,11 +3344,8 @@ compiler_dict(struct compiler *c, expr_ty e)
33443344
/* If there is more than one dict, they need to be merged into a new
33453345
* dict. If there is one dict and it's an unpacking, then it needs
33463346
* to be copied into a new dict." */
3347-
while (containers > 1 || is_unpacking) {
3348-
int oparg = containers < 255 ? containers : 255;
3349-
ADDOP_I(c, BUILD_MAP_UNPACK, oparg);
3350-
containers -= (oparg - 1);
3351-
is_unpacking = 0;
3347+
if (containers > 1 || is_unpacking) {
3348+
ADDOP_I(c, BUILD_MAP_UNPACK, containers);
33523349
}
33533350
return 1;
33543351
}

0 commit comments

Comments
 (0)