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

Function emit_clear_bitmaps

mypyc/codegen/emitclass.py:673–677  ·  view source on GitHub ↗

Emit C code to clear bitmaps that track if attributes have an assigned value.

(cl: ClassIR, emitter: Emitter)

Source from the content-addressed store, hash-verified

671
672
673def emit_clear_bitmaps(cl: ClassIR, emitter: Emitter) -> None:
674 """Emit C code to clear bitmaps that track if attributes have an assigned value."""
675 for i in range(0, len(cl.bitmap_attrs), BITMAP_BITS):
676 field = emitter.bitmap_field(i)
677 emitter.emit_line(f"self->{field} = 0;")
678
679
680def emit_attr_defaults_func_call(defaults_fn: FuncIR, self_name: str, emitter: Emitter) -> None:

Callers 2

generate_setup_for_classFunction · 0.85
emit_reuse_deallocFunction · 0.85

Calls 4

rangeClass · 0.85
lenFunction · 0.85
bitmap_fieldMethod · 0.80
emit_lineMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…