[bitc-dev] FN keyword
Christopher Gilbreth
cngilbreth at gmail.com
Wed Aug 11 08:24:43 PDT 2010
On Tue, Aug 10, 2010 at 7:01 PM, Jonathan S. Shapiro <shap at eros-os.org>wrote:
> The full production for function types is:
>
> fntype: [effects] fn ( argType [, argType]* ) -> resultType
>
I wonder if the function type syntax should allow for other attributes which
may be added in the future, e.g. calling conventions, or to declare that a
function is executed on a gpu (in some compiler-dependent way):
f : fn 'a -> 'b
f : fn[fastcall] 'a -> 'b
f : fn[Fortran,some_other_attribute] 'a -> 'b
f : fn[gpu] 'a -> 'b
(Are the brackets of any actual benefit in these examples?)
See also
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.coyotos.org/pipermail/bitc-dev/attachments/20100811/d8037a7c/attachment.html
More information about the bitc-dev
mailing list