>> But a fake signature makes errors harder to find and can make >> optimized builds works different as normal ones. > > I'm not sure how the signature is "fake". An unsigned integer is a > subset of integer. Parrot doesn't have a set of $U registers for > unsigned ints, does it? I suppose the routine that's directly called > from PIR could be wrapped by a separate one that gets called from > Perl6 by way of the stricter signature.
The function is called from an opcode with the value of a signed integer register (yes, there are no unsigned integer registers). Then if the function parameter is declared as unsigned, in that sense is fake. Unsigned integer is not a subset of integer, it has a broader positive range. All this in the parrot opcodes and his C support functions level. But if you talk about perl6, this is not applicable, the perl6 function can have any wanted signature, it will never call the function directly, it emits the opcode that will call it and can insert any check or change of his argument. If the sub implementation allows accidental sign changes, this will be his own bug. -- Salu2