Message234541
No, that happens in CALL_FUNCTION_KW:
>>> import dis
>>> dis.dis("f(x=1, **{'x': 1})")
1 0 LOAD_NAME 0 (f)
3 LOAD_CONST 0 ('x')
6 LOAD_CONST 1 (1)
9 LOAD_CONST 1 (1)
12 LOAD_CONST 0 ('x')
15 BUILD_MAP 1
18 CALL_FUNCTION_KW 256 (0 positional, 1 keyword pair)
21 RETURN_VALUE
There's no call to BUILD_MAP_UNPACK at all. Namely, it's raised from update_keyword_args (in turn from ext_do_call).
--- Tangential note: ---
In fact, it seems the only reason we keep the mess of unpacking in two places rather than just using BUILD_TUPLE_UNPACK and BUILD_MAP_UNPACK unconditionally is that CALL_FUNCTION_XXX looks to be slightly more efficient by only dealing with the case of a single unpack at the end. I think I see how to make the _UNPACKs fast enough for this case, though, so maybe we could remove it and unify a few things. I'd need to write it up, though. |
|
Date |
User |
Action |
Args |
2015-01-23 04:03:50 | Joshua.Landau | set | recipients:
+ Joshua.Landau, gvanrossum, twouters, georg.brandl, terry.reedy, paul.moore, ncoghlan, belopolsky, ezio.melotti, eric.araujo, andybuckley, r.david.murray, zbysz, eric.snow, Rosuav, berker.peksag, pconnell, NeilGirdhar, Jeff.Kaufman, SpaghettiToastBook |
2015-01-23 04:03:50 | Joshua.Landau | set | messageid: <1421985830.46.0.939250706921.issue2292@psf.upfronthosting.co.za> |
2015-01-23 04:03:50 | Joshua.Landau | link | issue2292 messages |
2015-01-23 04:03:49 | Joshua.Landau | create | |
|