[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
Ada comes to Xanadu!
- To: <xtech@xxxxxxxxxx>
- Subject: Ada comes to Xanadu!
- From: heh <heh@xxxxxxxxxx>
- Date: 22 Jun 90 14:16:03
OFFICE MEMO Ada comes to Xanadu! Date:6/22/90
I >KNOW< everybody has been waiting with bated breath for this one! I made a
slight change to the translator to help reduce the number of files included in
FM (because I can't get them to compile with inlines on).
What I did was to solve an older problem in a slightly more clean manner than
has been used to date. That is, I added the Modula2 / Ada construct for
declaring what a client uses from a module. Ok, ok, it's not really a full Ada
implementation (much to everyone's relief, i'm sure :-).
Up until now, the include scanner did not handle transitive includes. That
is, if you use a module which has a return value which is a class from yet
another module, and you functionally compose the use of that return value, so
that there is no local declaration, the include scanner would miss it. For
a module calls some Waldo member function and gets an ImmuSet back, and then,
instead of storing that, just asks for a stepper, as in:
blah = waldo->allWorkTypes ()-> stepper ();
Now, assume for the moment that setx.hxx has not been included yet. What you
get is a compile error.
The fix until now has been to declare a bogus, useless, confusing, and
warning generating local variable of the ImmuSet type. This would force the
include scanner to properly include setx.hxx.
Now! step right up and use our NEW, spankin' clean USES construct :
[ImmuSet] USES. "In the untranslated smalltalk"
This does nothing in smalltalk, and is not translated, so all it does is be
sure that the appropriate headers are included. It is present where it is
needed, so that when the code is changed, the changer can decide whether it is
still needed, AND you can do class references and find these places where the
class is used.
I recommend that we add these only in the places where we would get a compile
error if it were not present (as in the current bogus locals).
I have fixed up all of the current bogus variables.
I am also altering the translator to NOT automatically include xppx.hxx.
This should help my compile problems by not including unnecessary files, but I
will probably have to add a number of USES (of xpp classes) to ensure correct
compilation. I think this is the best solution at this time. We could try a
more complex transitive include scan, but that gets very difficult if you're
trying to include ONLY those headers that are really, really required.