comp.lang.ada
 help / color / mirror / Atom feed
From: kalvin.news@gmail.com
Subject: Re: Ada to C translator for small microcontrollers
Date: Sat, 31 Mar 2012 08:46:08 -0700 (PDT)
Date: 2012-03-31T08:46:08-07:00	[thread overview]
Message-ID: <8580709.239.1333208768840.JavaMail.geo-discussion-forums@ynes7> (raw)
In-Reply-To: <9tgt0lFqtU1@mid.individual.net>

keskiviikkona 28. maaliskuuta 2012 19.36.37 UTC+3 Niklas Holsti kirjoitti:
> It is true that C does not provide all the features of assembly 
> language, for all that it is called a "portable assembler". But I'm not 
> sure that this would be a large handicap for an Ada compiler that uses C 
> as an intermediate language (like the SofCheck one).
> 
> The C level could be a performance bottleneck if one wanted to support 
> wider numbers in Ada than the C compiler supports -- for example, an Ada 
> 64-bit Long_Integer with a C compiler that supports only 32-bit integers 
> -- but this is a marginal effect, I think.

Yes, the translator should be implemented so, that it would be compatible with the target C ie. no support for 64-bit integers etc. if the target C compiler doesn't support that. 

Nested procedures are also a bit tricy to implement in C, as the local stack frame needs to made visible to the inner procedure. This is doable with the struct of pointers passed as parameters for the "inner procedure", I guess. It is up to target C compiler optimization how much penalty there will be.

Br,
Kalvin



  parent reply	other threads:[~2012-03-31 15:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 12:48 Ada to C translator for small microcontrollers Tomi Saarnio
2012-03-26 13:44 ` Rego, P.
2012-03-26 14:14 ` Niklas Holsti
2012-03-26 15:48   ` Ludovic Brenta
2012-03-26 16:20     ` Simon Wright
2012-03-26 14:46 ` georg bauhaus
2012-03-26 19:16 ` anon
2012-03-27  9:46 ` kalvin.news
2012-03-27 17:22   ` anon
2012-03-27 20:13     ` kalvin.news
2012-03-28 14:29       ` KK6GM
2012-03-28 16:36       ` Niklas Holsti
2012-03-28 17:56         ` KK6GM
2012-03-28 21:03         ` Georg Bauhaus
2012-03-30 11:54           ` phil.clayton
2012-03-31 15:46         ` kalvin.news [this message]
2012-03-31 19:52           ` Rugxulo
2012-04-01 11:23             ` kalvin.news
2012-04-02 21:46             ` Niklas Holsti
2012-04-03  5:56               ` J-P. Rosen
2012-04-03  2:08 ` BrianG
2012-04-03  9:29   ` Georg Bauhaus
2012-05-21 10:35 ` kalvin.news
2012-05-21 12:27   ` Georg Bauhaus
2012-06-02 15:27     ` Marco
2012-06-05  9:18       ` kalvin.news
2012-06-05 12:17         ` Brian Drummond
2012-06-06  5:21           ` J-P. Rosen
2012-06-06 11:50             ` Brian Drummond
2012-06-10 15:41         ` Marco
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox