Currently functions have two subtypes: normal ones (0) and builtin
functions (USHRT_MAX). What would be the implications of adding two
more?

I propose adding FUNCTION_GENERATOR and FUNCTION_GENSTATE to
differentiate continue functions, and the state functions that they
return; and also a Pike-callable Function.function_type which will
return the corresponding type. Thus:

continue int demo() { }

Function.function_type(demo) == 1
Function.function_type(demo()) == 2

Alternatively, if this doesn't need to be a subtype, is there a way to
recognize them already? I'm poking around, trying to implement this,
but I think more information needs to be carried through to runtime -
might be wrong though.

ChrisA

Reply via email to