Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-15 19:38:03 -0700 (Thu, 15 Apr 2004)
Revision: 5656
Log message:
Added a comment on the front-end conversion of short-circuit
Boolean operations.
Note: as discussed the entire front stage (Mmc_core_front) is
going away. Some notes to whoever is in charge of this:
Requirements:
1. There should be a stage before the backend that makes sure
that all control-flow operations (conditionals) are in
tail position.
2. There needs to be a stage to remove syntactic sugar from
the source program. Ideally, this should be done after type
inference.
Items to consider:
1. I am not entirely sure that all syntactic sugar is context-free,
but perhaps it is. We can live with "macro-expansion" for now.
The code for conditionals will be clearly suboptimal, but
perhaps we can fix this up in a later optimization.
2. For now, let's keep the core language after front-end
conversions as small as possible. Clearly, we can get
more optimal code if we preserve the constructs (like
loops, short-circuit Boolean operations, etc). However,
I think we should think about correctness first, optimization
later. In particular, if we can assume that If{'e1; 'e2; 'e3}
is the only operator having non-strict evaluation, we will
have fewer headaches.
Changes | Path |
+4 -1 | mpcompiler/mmc/extensions/bool/mmc_ext_bool.ml |