def BUILD_MAP(self, instr):
nitems = instr.oparg
keys = []
values = []
for i in range(nitems):
map_instrs = []
while 1:
new_instr = self.ilst.pop(0)
if new_instr.opname == 'STORE_MAP':
break
map_instrs.append(new_instr)
items = self.decompile_block(map_instrs).stmnt()
assert len(items) == 2
values.append(items[0])
keys.append(items[1])
list_ = _ast.Dict(keys=keys, values=values, lineno=instr.lineno, col_offset=0)
self.ast_stack.append(list_)
评论列表
文章目录