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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5f6125e9594f9968 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.232.169 with SMTP id tp9mr2288284pbc.6.1333208769214; Sat, 31 Mar 2012 08:46:09 -0700 (PDT) Path: r9ni3151pbh.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: kalvin.news@gmail.com Newsgroups: comp.lang.ada Subject: Re: Ada to C translator for small microcontrollers Date: Sat, 31 Mar 2012 08:46:08 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8580709.239.1333208768840.JavaMail.geo-discussion-forums@ynes7> References: <2424259e-cf1c-408e-a57e-f2c948087186@i2g2000vbv.googlegroups.com> <18324383.19.1332841560517.JavaMail.geo-discussion-forums@vbht7> <26305817.1823.1332879226490.JavaMail.geo-discussion-forums@vbiz13> <9tgt0lFqtU1@mid.individual.net> NNTP-Posting-Host: 83.150.124.2 Mime-Version: 1.0 X-Trace: posting.google.com 1333208769 9016 127.0.0.1 (31 Mar 2012 15:46:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 31 Mar 2012 15:46:09 +0000 (UTC) In-Reply-To: <9tgt0lFqtU1@mid.individual.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.150.124.2; posting-account=QrZwxQoAAAByl3YAWTpexAk3yBYyZMHn User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-03-31T08:46:08-07:00 List-Id: 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=20 > language, for all that it is called a "portable assembler". But I'm not= =20 > sure that this would be a large handicap for an Ada compiler that uses C= =20 > as an intermediate language (like the SofCheck one). >=20 > The C level could be a performance bottleneck if one wanted to support=20 > wider numbers in Ada than the C compiler supports -- for example, an Ada= =20 > 64-bit Long_Integer with a C compiler that supports only 32-bit integers= =20 > -- but this is a marginal effect, I think. Yes, the translator should be implemented so, that it would be compatible w= ith the target C ie. no support for 64-bit integers etc. if the target C co= mpiler doesn't support that.=20 Nested procedures are also a bit tricy to implement in C, as the local stac= k frame needs to made visible to the inner procedure. This is doable with t= he struct of pointers passed as parameters for the "inner procedure", I gue= ss. It is up to target C compiler optimization how much penalty there will = be. Br, Kalvin