From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,37b5f16b9be86fec X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: ada -> C translator Date: 1997/04/08 Message-ID: #1/1 X-Deja-AN: 231553708 References: <33436B29.41C6@sema-grenoble.fr> <5i243c$i1h@mulga.cs.mu.OZ.AU> <5i4jok$qiq@mulga.cs.mu.OZ.AU> <5i9r5t$nb6@mulga.cs.mu.OZ.AU> <5idcjq$8lh@mulga.cs.mu.OZ.AU> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-04-08T00:00:00+00:00 List-Id: Fergus said <> Robert replies Of course, but, if you understand the point I was making (which I think you still miss), you will see that this is totally irrelevant. One of the requirements of an Ada compiler is that it properly duplicate calling sequences to other languages, paying attention to ABI requirements. Fergus said <> Robert replies Sorry, that still misses the point. Short of writing one compiler that supports all known and unknown targets, you cannot use this approach to solve the problem. Furthermore, since such choices can be quite fundamental the amount of stuff you are talking about would be huge and infeasible. For example, what shall we do with exceptions in C? There are two answers that I know of. One is to always pass an implicit exception boolean around on every call. The other is to use setjmp/longjmp. The choice between these two will radically affect the compiler, the code it generates, and the natural of the runtime library. Just trying to generate code that supported both of these possibilities would enormously complicate the compiler, and of course if I give you K more examples, then you have a 2**K way explosion of interactions that have to be considered. You are still thinking in terms of conventional C generated by humans. Sorry -- wrong level of thinking, not applicable here! Your discussion of the incr_sp approach is flawed for the same reason. It is hard enough to generate correct efficient code for a single target. To generate correct and efficient code for all possible targets using conditional compilation might be conceptually possible, but in practice is out of the question from a complexity standpoint. FAR out of the question.