Re: Java virtual machine as target language for C/C++

Dave Lloyd <dave@occl-cam.demon.co.uk>
8 Jun 1996 18:24:58 -0400

          From comp.compilers

Related articles
[20 earlier articles]
Re: Java virtual machine as target language for C/C++ pardo@cs.washington.edu (1996-05-19)
Re: Java virtual machine as target language for C/C++ robison@kai.com (Arch Robison) (1996-05-21)
Re: Java virtual machine as target language for C/C++ pardo@cs.washington.edu (1996-05-24)
Re: Java virtual machine as target language for C/C++ wws@renaissance.cray.com (1996-05-25)
Re: Java virtual machine as target language for C/C++ tmb@best.com (1996-05-26)
Re: Java virtual machine as target language for C/C++ dw3u+@andrew.cmu.edu (Daniel C. Wang) (1996-05-27)
Re: Java virtual machine as target language for C/C++ dave@occl-cam.demon.co.uk (Dave Lloyd) (1996-06-08)
Re: Using C as an UNCOL toon@moene.indiv.nluug.nl (Toon Moene) (1996-06-09)
Re: Java virtual machine as target language for C/C++ d.love@daresbury.ac.uk (Dave Love) (1996-06-13)
Re: Java virtual machine as target language for C/C++ bos@serpentine.com (1996-06-14)
C as a target language conway@cs.mu.OZ.AU (Thomas Charles CONWAY) (1996-06-14)
Re: Java virtual machine as target language for C/C++ cdg@nullstone.com (1996-06-21)
| List of all articles for this month |
From: Dave Lloyd <dave@occl-cam.demon.co.uk>
Newsgroups: comp.compilers
Date: 8 Jun 1996 18:24:58 -0400
Organization: Compilers Central
References: 96-05-061 96-05-163
Keywords: UNCOL, C

> I'm surprised no one has mentioned C as a resonably sucessful multi-langauge
> multi-target UNCOL. f2c,p2c,m2c, Scheme->C, sml2c, Mercury, ghc, .... all


Foot shot with the first example! C is terribly limited in scope and has some
really nasty holes in its type system. Important information gets lost when
squeezing down to C. Net result is that if you feed f2c to a good C compiler,
you will do worse on the sort of numeric fortran code than if you have a
natural Fortran compiler which understands complex arithmetic, arrays,
fortran no-alias parameter passing, equivalence and common blocks, loops
with a defined counter. Sure you can reconstruct most of this with decent
static analysis but it is harder (for which read more cases are excluded on
reasonable grounds of paranoia) than for a Fortran compiler starting with
this information.


As illustration, g77 produces substantially better code than f2c+gcc.


The situation is more absurd with Fortran 90 which provides more powerful
arrays and extensive array syntax that can be highly optimised with
comparatively cheap analysis (or for that matter directly invoke
hand-optimised BLAS).


Parallel programming constructs and exception handling make matters worse
still.
----------------------------------------------------------------------
Dave Lloyd Email: Dave@occl-cam.demon.co.uk
Oxford and Cambridge Compilers Ltd Phone: (44) 1223 572074
55 Brampton Rd, Cambridge CB1 3HJ, UK
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.