MCPcopy Index your code
hub / github.com/python/mypy / visit_tuple_set

Method visit_tuple_set

mypyc/codegen/emitfunc.py:291–299  ·  view source on GitHub ↗
(self, op: TupleSet)

Source from the content-addressed store, hash-verified

289 self.emit_line("return %s;" % value_str)
290
291 def visit_tuple_set(self, op: TupleSet) -> None:
292 dest = self.reg(op)
293 tuple_type = op.tuple_type
294 self.emitter.declare_tuple_struct(tuple_type)
295 if len(op.items) == 0: # empty tuple
296 self.emit_line(f"{dest}.empty_struct_error_flag = 0;")
297 else:
298 for i, item in enumerate(op.items):
299 self.emit_line(f"{dest}.f{i} = {self.reg(item)};")
300
301 def visit_assign(self, op: Assign) -> None:
302 dest = self.reg(op.dest)

Callers

nothing calls this directly

Calls 5

regMethod · 0.95
emit_lineMethod · 0.95
lenFunction · 0.85
enumerateFunction · 0.85
declare_tuple_structMethod · 0.80

Tested by

no test coverage detected