Currently I have this:
- a subroutine call can be prototyped or non_prototyped
- a subroutine definition can be both and un_prototyped. In the latter case it checks C<I0> and takes parameters either way.
- return values are prototyped only currently
Q: Should there be code to check the amount and types of function parameters?
Always, or on demand (e.g. with a "check_params" in the sub def)?
Now to return conventions:
Q: Is the prototype specifier for return values independent or is it the same as that in the subroutine definition. Or has that to be checked at runtime (I3 has some info about expected return values, but not really, where to place return value(s))
Q: And finally, how does the caller get the return value(s), again a runtime check of which prototype specifier is having that info?
The same WRT checking applies here.
I think, parrot/imcc and any HL calling some (external) subroutines need header files, which have the information about function signatures and return values.
Q: Which format (C-like .h files?), in runtime/parrot/include?
Thanks, leo