[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10. Miscellaneous notes

This chapter is a repository of miscellaneous notes that belong elsewhere or nowhere. They're here because I want them written down, for now anyway, and I'm not sure where else to put them. There may be duplication here with things elsewhere in the docs. I'm not bothering to ensure there isn't. It's better to have things written down twice than not at all. If there is a conflict between notes here and elsewhere, check the chronology. I may have changed my mind. If not, the situation may be complicated and I don't have a strong opinion on what's right. No claim is made that these notes represent my complete opinion. (Hmmm... lessee what other caveats I can throw in here ... :-)

10.1 Description language notes  
10.2 CGEN architecture notes  
10.3 COS notes  
10.4 RTL notes  
10.5 Guile implementation notes  
10.6 Code generation notes  
10.7 Machine generated files notes  
10.8 Implementation language notes  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.1 Description language notes


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.2 CGEN architecture notes


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.3 COS notes


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.4 RTL notes


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.5 Guile implementation notes


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.6 Code generation notes


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.7 Machine generated files notes


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.8 Implementation language notes

In the end I think the implementation language (or the Guile implementation) will have to change. If one compares the speed of gcc's gen* file generators vs cgen's, and one envisions the day when machine generated files are built at build time, then I think the user community will require similar speed in file generation. Guile isn't fast enough. And while Guile+Hobbit may be, for the one-time builder the time taken to compile Hobbit, run it, and compile the result, will appear to swamp any gains. There is also the additional burden of building Guile first (though with my prefered Guile implementation I'm _hoping_ that wouldn't be a problem).

The pragmatic choice is C. Blech.

A better choice would be C++ but then that would obviously place a requirement on having a C++ compiler available in order to build binutils, for example (assuming machine generated files are built at build time).

Java would also be a better implementation language than C [an interesting experiment would be Kawa]. But it's worse as a pragmatic choice than C++.

My prefered choice is a small-and-fast subset of Guile that gets distributed with binutils, gdb, etc. IMO Guile is too bloated and unmaintainable for the casual maintainer (hacking on its innards requires too steep a learning curve, and is one that is easily slipped back down should one step away from it for too long). If those can be fixed and the speed of cgen's file generation can be made acceptable, then that is the path I would choose.

In making the choice people need to look forward rather than look backward. We're finally switching the GNU tools to ANSI C. If the host doesn't provide an ANSI C compiler the user is expected to get one (GCC). Well, G++ is available on most if not all hosts of concern, so in this day and age requiring C++ in order to build binutils isn't as much of a burden as it use to be. Cgen is a forward looking design. At its heart is a goal to close no doors on future uses. That's a pretty lofty goal. Forcing people to achieve that goal with C because of pragmatic concerns is unjustifiable, IMO.

Note that changing the "implementation language" does _not_ mean Guile cannot or will not be used for various things! I think Guile should continue to be used for prototyping as well as certain applications.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Ben Elliston on January, 8 2003 using texi2html