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

Method attr_bitmap_expr

mypyc/codegen/emit.py:441–445  ·  view source on GitHub ↗

Return reference to the attribute definedness bitmap.

(self, obj: str, cl: ClassIR, index: int)

Source from the content-addressed store, hash-verified

439 return f"bitmap{n + 1}"
440
441 def attr_bitmap_expr(self, obj: str, cl: ClassIR, index: int) -> str:
442 """Return reference to the attribute definedness bitmap."""
443 cast = f"({cl.struct_name(self.names)} *)"
444 attr = self.bitmap_field(index)
445 return f"({cast}{obj})->{attr}"
446
447 def emit_attr_bitmap_set(
448 self, value: str, obj: str, rtype: RType, cl: ClassIR, attr: str

Callers 1

Calls 2

bitmap_fieldMethod · 0.95
struct_nameMethod · 0.45

Tested by

no test coverage detected