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

Method visit_init_static

mypyc/codegen/emitfunc.py:564–571  ·  view source on GitHub ↗
(self, op: InitStatic)

Source from the content-addressed store, hash-verified

562 self.emit_line(f"{dest} = {name};", ann=op.ann)
563
564 def visit_init_static(self, op: InitStatic) -> None:
565 value = self.reg(op.value)
566 prefix = PREFIX_MAP[op.namespace]
567 name = self.emitter.static_name(op.identifier, op.module_name, prefix)
568 if op.namespace == NAMESPACE_TYPE:
569 value = "(PyTypeObject *)%s" % value
570 self.emit_line(f"{name} = {value};")
571 self.emit_inc_ref(name, op.value.type)
572
573 def visit_tuple_get(self, op: TupleGet) -> None:
574 dest = self.reg(op)

Callers

nothing calls this directly

Calls 4

regMethod · 0.95
emit_lineMethod · 0.95
emit_inc_refMethod · 0.95
static_nameMethod · 0.80

Tested by

no test coverage detected