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

Method visit_assign_multi

mypyc/codegen/emitfunc.py:319–333  ·  view source on GitHub ↗
(self, op: AssignMulti)

Source from the content-addressed store, hash-verified

317 self.emit_line(f"{dest} = {src};")
318
319 def visit_assign_multi(self, op: AssignMulti) -> None:
320 typ = op.dest.type
321 assert isinstance(typ, RArray), typ
322 dest = self.reg(op.dest)
323 # RArray values can only be assigned to once, so we can always
324 # declare them on initialization.
325 self.emit_line(
326 "%s%s[%d] = %s;"
327 % (
328 self.emitter.ctype_spaced(typ.item_type),
329 dest,
330 len(op.src),
331 c_array_initializer([self.reg(s) for s in op.src], indented=True),
332 )
333 )
334
335 def visit_load_error_value(self, op: LoadErrorValue) -> None:
336 reg = self.reg(op)

Callers

nothing calls this directly

Calls 6

regMethod · 0.95
emit_lineMethod · 0.95
c_array_initializerFunction · 0.90
isinstanceFunction · 0.85
lenFunction · 0.85
ctype_spacedMethod · 0.80

Tested by

no test coverage detected