Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!tektronix!oresoft!rick From: rick@oresoft.UUCP (Rick Lahrson) Newsgroups: comp.sys.amiga,comp.lang.misc Subject: Re: Compilers? Message-ID: <71@oresoft.UUCP> Date: Wed, 31-Dec-69 18:59:59 EDT Article-I.D.: oresoft.71 Posted: Wed Dec 31 18:59:59 1969 Date-Received: Wed, 16-Sep-87 02:23:29 EDT References: <1708@amiga.amiga.UUCP> <581@sugar.UUCP> <935@unicus.UUCP> <66@oresoft.UUCP> <5042@jade.BERKELEY.EDU> <70@oresoft.UUCP> <2122@sol.ARPA> Reply-To: rick@oresoft.UUCP (Rick Lahrson) Organization: Oregon Software, Portland OR Lines: 40 Keywords: compiler assembler dwim mating Summary: Just learning to talk "net" 8-) Xref: mnetor comp.sys.amiga:8356 comp.lang.misc:659 In article <2122@sol.ARPA> crowl@cs.rochester.edu (Lawrence Crowl) writes: >In article <70@oresoft.UUCP> rick@oresoft.UUCP (Rick Lahrson) writes: >>I say the compiler should model the target hardware, and generate >>code for that. > >Wait a second! We have two models, the language model and the machine model. >The compiler itself does not model anything, it translates between two models. >I submit the language should not model any SPECIFIC machine. (Note that most >algorithmic languages assume a rather generic von Neuman architecture.) > >The compiler should implement the language's model on the machine's model as >best as possible given the development resources. As long as the language >model is faithfully implemented, how close the resulting code is to the machine >model is a performance issue. (All bets are off if you are mixing languages.) OK, I'm starting to catch on. I'm a relative neophyte at posting to the net, with its wide ranging readership (I'm used to discussing such topics with just my fellow compiler writers, and there's a large body of things understood as background, so my communications have come to rely on that -- I'll be more rigorous in the future). Yes, compilers deal with two models: the language and the target machine (or pseudo-machine -- in this case the 68K, a real machine). When I said the compiler should model the target hardware, I meant that it should use its "mental model" of the target to determine how to generate code. I didn't suggest that a LANGUAGE should have anything to do with specific hardware, just the compiler (specifically, just the "back end" (code generator) of the compiler). And yes, it is exactly a performance issue. That's what offends me about BPTR's -- they waste time and space. I don't know BCPL, and maybe that voids my right to an opinion about BPTR's, but certain compilers I DO know about can actually translate "add one word" into "add four bytes"! 8-) Seems to me BCPL should have been able to do that, too. Sure, I'm willing to let this topic die. 8-) -- Rick Lahrson ...tektronix!oresoft!rick Disclaimer: If I ever speak for anyone but me, I'll warn you in advance.