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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,78b2880bc7e78e39 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-16 17:22:09 PST Path: supernews.google.com!sn-xit-03!supernews.com!news-feed.riddles.org.uk!news.litech.org!news.ems.psu.edu!news.telebeam.net!washdc3-snf1!cpk-news-hub1.bbnplanet.com!cambridge1-snf1.gtei.net!news.gtei.net!homer.alpha.net!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <98qumf$5sf$1@nh.pace.co.uk> <98r4g1$7r1$1@nh.pace.co.uk> <3AB22CB2.E8A851A5@averstar.com><98tmai$5q5$1@nh.pace.co.uk> Subject: Re: RISC X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 Message-ID: Date: Fri, 16 Mar 2001 19:13:06 -0600 NNTP-Posting-Host: 156.46.62.124 X-Complaints-To: abuse@alpha.net X-Trace: homer.alpha.net 984791795 156.46.62.124 (Fri, 16 Mar 2001 19:16:35 CST) NNTP-Posting-Date: Fri, 16 Mar 2001 19:16:35 CST Xref: supernews.google.com comp.lang.ada:5787 Date: 2001-03-16T19:13:06-06:00 List-Id: Robert A Duff wrote in message ... >"Marin David Condic" writes: > >> And the only allowed operations on a table are assignments to/from fields or >> assignments to/from the whole structure. (No math or other stuff - just data >> motion) Would something like this take the burden off of the compiler >> writer? > >I don't think it helps much. If you do X.Y * A.B, the compiler needs to >extract bit fields for Y and B into registers. Once they're in >registers, doing the multiply is no problem. Disallowing that multiply >would not simplify. For records, I agree, it doesn't matter much. For arrays, it certainly would be a lot easier if you didn't have to deal with slices and relationals on arrays of discretes. Those (and generic formal types) are the reason that Janus/Ada doesn't support 'Component_Size very well. I've never been able to figure out any sane way to implement an arbitrary slice of a packed boolean array assigned into another packed boolean array. Any particular case isn't too hard, but the general case looks like: Bar (Start .. End) := Foo (Start+Offset .. End+Offset); About the only thing I can see to do is punt and do it a component at a time; but the performance would be abismal. Still, Bob is right that "helpful" restrictions often turn out to be not helpful. The obvious example is the restrictions on "others" clauses in aggregates in Ada 83. We spent more effort trying to implement the restrictions than we did implementing the aggregates in the first place (I mistakenly implemented nearly full support for arbitrary "others" clauses before discovering that it wasn't required or allowed.) Randy.