<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>This is a good idea. An alternate proposal would be to put the calling conventions in an external file, but this change would seem to be the simplest and in line with the stated definition of pragamas.</div><div><br></div><div><br></div><br><div><div>On 21/02/2010, at 10:52 PM, Jay K wrote:</div><br class="Apple-interchange-newline"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">1) All platforms should accept, but silently ignore, the NT386/I386_CYGWIN/etc. calling conventions:<br>at least __stdcall, and __cdecl<br>Probably all the synonyms: C, WINAPI, CALLBACK, WINAPIV, APIENTRY, APIPRIVATE, PASCAL,<br> <br>This is a very small change.<br> <br> <br>This is will allow:<br> a) possibly merging the two nearly identical OpenGL.i3 files<br> b) implementing functions in Modula-3 that are portable, but use __stdcall, possibly for perf<br> I intend to that for hand.c's replacement, soon.<br> <span class="Apple-converted-space"> </span><br> <br>Maybe experiment as to the perf.<br>__stdcall is supposed to be faster, because the code is smaller.<br>But __cdecl might be able to compete by using stores to the stack instead of pushes?<br> I'd have to see how that compares in size, and it does increase stack usage some.<br> <br> <br>Probably not worth large scale experimenting/changing, but maybe nice to mark<br>new functions/interfaces as __stdcall (see next point).<br> <br> <br>I was actually thinking of trying flat out changing the default, but I think that is too difficult,<br>what with all the C<=>Modula-3 transitions. And not worth it given other<br>more valuable work to do.<br> <br> <br>2) The calling convention pragmas should be allowed on an interface, to set<br>the default for an interface.<br> <br>2b) and I guess as well on a module, for unexported functions<br> <br>I assert that other than __stdcall and __cdecl on NT386, nothing else is<br>particularly interesting here. There is __fastcall, maybe interesting.<br>It has different meanings to different compilers.<br>I'd rather keep this all fairly constrained.<br> <br>No other platform has more than one calling convention, so this doesn't<br>have be to further generalized. Besides, as long as no platform uses<br>the same name to mean multiple things, ok.<br> Mac68K Classic?<br> Mac68K CFM?<span class="Apple-converted-space"> </span><br> Win16?<br> MS-DOS?<br> <br> <br>(I did recently acquire a working Mac68K, as well it is easily<br> run on a modern PPC Mac; far down the list, but...)<br> <br> <br> - Jay<br></div></span></div><br></body></html>