[Python-checkins] cpython: Issue #28823: Simplified compiling with opcode BUILD_MAP_UNPACK.

serhiy.storchaka python-checkins at python.org
Mon Nov 28 13:56:51 EST 2016


https://hg.python.org/cpython/rev/9ded2433dc2c
changeset: 105386:9ded2433dc2c
user: Serhiy Storchaka <storchaka at gmail.com>
date: Mon Nov 28 20:56:37 2016 +0200
summary:
 Issue #28823: Simplified compiling with opcode BUILD_MAP_UNPACK.
files:
 Python/compile.c | 7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/Python/compile.c b/Python/compile.c
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -3344,11 +3344,8 @@
 /* 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;
 }
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /