From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f891f,14f3fa9fb2c63b2d X-Google-Attributes: gidf891f,public X-Google-Thread: 109fba,14f3fa9fb2c63b2d X-Google-Attributes: gid109fba,public X-Google-Thread: fc89c,14f3fa9fb2c63b2d X-Google-Attributes: gidfc89c,public X-Google-Thread: 102b75,14f3fa9fb2c63b2d X-Google-Attributes: gid102b75,public X-Google-Thread: 10cc59,14f3fa9fb2c63b2d X-Google-Attributes: gid10cc59,public X-Google-Thread: 103376,14f3fa9fb2c63b2d X-Google-Attributes: gid103376,public X-Google-Thread: fb4a0,14f3fa9fb2c63b2d X-Google-Attributes: gidfb4a0,public X-Google-Thread: f678f,14f3fa9fb2c63b2d X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1993-12-15 05:24:18 PST Xref: gmd.de comp.lang.misc:5278 comp.lang.ada:8846 comp.lang.pascal:17637 comp.lang.c++:40625 comp.unix.programmer:10933 comp.arch:18175 comp.unix.osf.misc:832 comp.unix.unixware:748 Newsgroups: comp.lang.misc,comp.lang.ada,comp.lang.pascal,comp.lang.c++,comp.unix.programmer,comp.arch,comp.unix.osf.misc,comp.unix.unixware Path: gmd.de!newsserver.jvnc.net!yale.edu!spool.mu.edu!howland.reston.ans.net!EU.net!sunic!uts!diku!torbenm From: torbenm@diku.dk (Torben AEgidius Mogensen) Subject: Re: ANDF - some (mis)information Message-ID: <1993Dec15.121017.16629@odin.diku.dk> Sender: torbenm@embla.diku.dk Date: Wed, 15 Dec 1993 12:10:17 GMT References: <2el49dINN638@network.ucsd.edu> Organization: Department of Computer Science, U of Copenhagen mbk%anl433.uucp@Germany.EU.net (Matt Kennel) writes: >There are also claims that the semantics of C are insufficient as an output >code for some other kinds of languages, which is probably true. >In that case, I think that one ought to attempt to identify these, and make >extensions to C so as to make it more friendly as an intermediate language, >and/or impose other portability requirements on 'ANDF-certified' intermediate C >code. >It might easier to get a few changes into C up and running rather than >starting from scratch. Two things that I (and others) have missed in C as an intermediate language for implementation of functional languages are tail-call optimization and indirect jumps. Tail-call optimization means that you are guarateed that if the last thing you do in a procedure or function is to call another procedure or function, then all the stack space that the calling function uses is removed from the stack before the called function uses any stack space. This ensures constant stack usage of tail-recursive (mutually) recursive functions. Indirect jumps are useful to implement higher order functions and the socalled "tagless" abstract machines. Something akin to the assigned goto of Fortran is O.K. I don't suggest pointer arithmetic on jumps, though I'm sure some C-hackers would love that ;-). Torben Mogensen (torbenm@diku.dk)