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

Method enter

mypyc/irbuild/builder.py:1324–1339  ·  view source on GitHub ↗
(self, fn_info: FuncInfo | str = "", *, ret_type: RType = none_rprimitive)

Source from the content-addressed store, hash-verified

1322 return res
1323
1324 def enter(self, fn_info: FuncInfo | str = "", *, ret_type: RType = none_rprimitive) -> None:
1325 if isinstance(fn_info, str):
1326 fn_info = FuncInfo(name=fn_info)
1327 self.builder = LowLevelIRBuilder(self.errors, self.options)
1328 self.builder.set_module(self.module_name, self.module_path)
1329 self.builders.append(self.builder)
1330 self.symtables.append({})
1331 self.runtime_args.append([])
1332 self.fn_info = fn_info
1333 self.fn_infos.append(self.fn_info)
1334 self.ret_types.append(ret_type)
1335 if fn_info.is_generator:
1336 self.nonlocal_control.append(GeneratorNonlocalControl())
1337 else:
1338 self.nonlocal_control.append(BaseNonlocalControl())
1339 self.activate_block(BasicBlock())
1340
1341 def leave(self) -> tuple[list[Register], list[RuntimeArg], list[BasicBlock], RType, FuncInfo]:
1342 builder = self.builders.pop()

Callers 11

enter_methodMethod · 0.95
gen_func_itemFunction · 0.45
gen_glue_methodFunction · 0.45
gen_glue_propertyFunction · 0.45
gen_glue_property_setterFunction · 0.45
gen_dispatch_func_irFunction · 0.45
gen_property_getter_irFunction · 0.45
gen_property_setter_irFunction · 0.45
gen_generator_func_bodyFunction · 0.45
transform_mypy_fileFunction · 0.45

Calls 9

activate_blockMethod · 0.95
FuncInfoClass · 0.90
LowLevelIRBuilderClass · 0.90
BaseNonlocalControlClass · 0.90
BasicBlockClass · 0.90
isinstanceFunction · 0.85
appendMethod · 0.80
set_moduleMethod · 0.45

Tested by

no test coverage detected