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

Method emit_attr_bitmap_set

mypyc/codegen/emit.py:447–455  ·  view source on GitHub ↗

Mark an attribute as defined in the attribute bitmap. Assumes that the attribute is tracked in the bitmap (only some attributes use the bitmap). If 'value' is not equal to the error value, do nothing.

(
        self, value: str, obj: str, rtype: RType, cl: ClassIR, attr: str
    )

Source from the content-addressed store, hash-verified

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
449 ) -> None:
450 """Mark an attribute as defined in the attribute bitmap.
451
452 Assumes that the attribute is tracked in the bitmap (only some attributes
453 use the bitmap). If 'value' is not equal to the error value, do nothing.
454 """
455 self._emit_attr_bitmap_update(value, obj, rtype, cl, attr, clear=False)
456
457 def emit_attr_bitmap_clear(self, obj: str, rtype: RType, cl: ClassIR, attr: str) -> None:
458 """Mark an attribute as undefined in the attribute bitmap.

Callers 2

generate_setterFunction · 0.80
visit_set_attrMethod · 0.80

Calls 1

Tested by

no test coverage detected