On Tue, 17 Aug 2010, Hiltibidal, Rob wrote:
Personally I prefer dealing with a native pascal compiler
FPC compiles or used to compile to assembler for some things,... very fast.
Seems to me the "pggy back" method for using C as the base compiler will add delayus and debug symbol issues.
Might be a better idea to simply go the byte code route.
I'd rather skip the intermediate language translator step completely and go straight to a rewrite of the compiler in Pascal, but I don't see that happening, unless one of us relieves Frank of the burden of maintaining the interface to the GCC back end (I don't think I have time to learn the interface at this point either, sorry to say). Given that the translator step appears to be the way we're going in the short term, bytecode might be an acceptable intermediary if it is is promptly converted to native binary (the bytecode compiler would effectively replace the GCC back end), rather than requiring execs to include an onboard p-code interpreter, as I have to think that the latter would slow execs down dramatically, and it would make cross-language development much more difficult.
I'm not terribly happy about using C++ as the intermediate language, but it does have the virtue of being readily available on just about every computing platform in common use. A Wirthian language like Ada would probably work better as an interediate language, but then the developers would have to distribute compiler binaries for whatever computing platforms people are likely to use (or make cross-compilation insanely easy), and someone would have to test frequently to make sure the interface still works. The same thing would have to be done with a bootstrapped Pascal compiler, but that would be under the control of this set of developers, rather than a different set that has little or no reason to care about Pascal.
Thought that just occurred to me:
Given the similarities between Pascal and Ada, how feasible would it be to adapt the existing GNAT codebase to compile Pascal, instead of Ada?
--------------------------| John L. Ries | Salford Systems | Phone: (619)543-8880 x107 | or (435)867-8885 | --------------------------|
-----Original Message----- From: gpc-owner@gnu.de [mailto:gpc-owner@gnu.de] On Behalf Of Peter Gerwinski Sent: Tuesday, August 17, 2010 12:52 PM To: GNU Pascal mailing list Subject: Re: How important is GPC for you?
Kevan Hashemi wrote:
Given a binary version of the compiler, we apply this binary to a new
version of the Pascal GPC source code, which produces a new C++
program
representing the compiler, which we compile again with GCC, to produce
a
new compiler binary. Is that how it would work?
Yes, but all this will be happening automatically behind the stage. The command line to compile a GPC program will remain as simple as "gpc hello.pas -o hello".
And I assume the advantage of C++ as the output is that you could, in
theory, use any C++ compiler to get the binary.
That's one potential advantage of C++. For a detailed discussion, see Frank's page http://fjf.gnu.de/gpc-future.html, section "GPC as a C++ Converter".
To what extent will you use C++ features particular to GCC?
IMHO it is best to adhere to ISO standard C++. But anyway, the backend is step 2.
Peter
Dr. rer. nat. Peter Gerwinski - http://www.peter.gerwinski.de G-N-U GmbH - First Class IT Services - http://www.g-n-u.de German pages for GNU & free software - http://www.gnu.de GNU Pascal - http://www.gnu-pascal.de
PRIVILEGED AND CONFIDENTIAL This email transmission contains privileged and confidential information intended only for the use of the individual or entity named above. If the reader of the email is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any use, dissemination or copying of this email transmission is strictly prohibited by the sender. If you have received this transmission in error, please delete the email and immediately notify the sender via the email return address or mailto:postmaster@argushealth.com. Thank you.