[bitc-dev] Issue: underparameterized values
Jonathan S. Shapiro
shap at eros-os.org
Sat Sep 3 03:12:52 EDT 2005
There is a third strategy that you have not mentioned, which is to
annotate the procedure arguments with additional length parameters
describing the argument lengths, but as you say, generating good code
for this is challenging.
For BitC, unboxing in order to solve this problem is not an option in
the design space. Our current plan is to generate different code for
different type instantiations.
Note, however, that there are many cases where the same instantiation
will work -- e.g. all ref cells of abstract type can be handled by the
I need to go back and track down the reference, but there was a paper on
size-based polymorphism that worked all of this stuff out with
The need for what you call monomorphisation (thanks for the term; we
have been calling this "lambda specialization" or "template expansion"
interchangeably) has also driven us to add the :opaque qualifier, and to
remove the ability to specify opaque value types without giving enough
information to describe their size.
More information about the bitc-dev