On Wed, 07 Jan 2009 21:13:12 -0500, Norman Ramsey wrote: >> Is it true that the only types on C-- are the bits8, bits16, etc., up >> to > > some small limit? (although they may be given new names by a type > > definition) > > > > That it recognises nothing like C's structs and unions and so forth, > > and that that is entirely the job of the front end, which will likely > > be generating code containing a lot of numerical constants for field > > offsets and the like? > > Yes, that's exactly right. > > There is also a boolean type, but there are no variables of boolean > type, only expressions. > > In hindsight we have learned that it is convenient to write parts of the > run-time system in C--, and we have an embryonic proposal for a dialect > called "Systems C--" that will provide some rudimentary facilities, > using the same syntactic mechanisms used to lay out initialized data. > But I doubt this dialect will be implemented unless a volunteer steps > forward, or unless we get funding for new work on run-time systems.
Just what *is* the state of the run-time system? I assume Chapter 8 is implemented. Is any of chapter 11 implemented? I've noticed that some of Section 11.1 is just a way of generating code into a file in a different order, to make life easier for "a small, simple compiler". I've concocted a data structure that effectively solves some of these issues, without requiring a lot of specialized data structures to keep track of things, or new features in the C-- language. It's what I call an insertable string. (I desperately need *short*, convincing meaningful words for the types and operations, and I haven't found them Suggestions eagerly sought.) An insertable string is a sequence of characters and insertion-points. It starts out with no characters and just an insertion point. The operations on it are: * to insert a sequence of characters immediately before an insertion point. * to create a new insertion point immediately before an existing insertion point. * To take the entire insertable-string and write it out to a file. That's it. Very imperative. Easily implementable with a rather simple data structure involving lists of buffers and such, as long as you're willing to buffer it all in RAM. With today's RAM, that's usually not an issue. If you want to be fancy, you can add operations to indent and unindent (for readability), or to insert insertable-strings into an insertion- point (dag OK, but circularity at the user's peril), but I haven't done any of these things. It has really simplified the front-end code generator, at no cost in C-- language complexity. -- hendrik _______________________________________________ Cminusminus mailing list [email protected] https://cminusminus.org/mailman/listinfo/cminusminus
