Bang more on BUIlD_MAP_UNPACK

there are still bugs. Note:

{**{'x': 1}, **{'y': 2}} and
{{'x': 1}, **{'y': 2}}

generate the same Python 3.5+ bytecode.
This commit is contained in:
rocky
2017-05-02 21:55:41 -04:00
parent 91b86ac156
commit 246495febd
6 changed files with 20 additions and 15 deletions

View File

@@ -36,10 +36,11 @@ class Python35Parser(Python34Parser):
expr ::= unmap_dict
expr ::= unmapexpr
unmap_dict ::= mapexpr BUILD_MAP_UNPACK
unmap_dict ::= mapexpr unmap_dict
unmap_dict ::= dictcomp BUILD_MAP_UNPACK
build_list ::= expr BUILD_MAP_UNPACK
unmap_dict ::= kv_lists BUILD_MAP_UNPACK
kv_lists ::= kv_list kv_lists
kv_lists ::= kv_list
# Python 3.5+ has WITH_CLEANUP_START/FINISH