def take_function_register(self, rtype = SharedData.TYPES.NO_TYPE):
reg = SharedData.FUNCTION_REGISTER<EOL>if reg not in self.free_registers:<EOL><INDENT>self.error("<STR_LIT>")<EOL><DEDENT>self.free_registers.remove(reg)<EOL>self.used_registers.append(reg)<EOL>self.symtab.set_type(reg, rtype)<EOL>return reg<EOL>
Reserves register for function return value and sets its type