public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Dave Brolley <brolley@redhat.com>
To: ttn@glug.org
Cc: cgen@sources.redhat.com
Subject: Re: [patch][commit] New (if (...) (...) (...)) Test Allowed at Top  Level  of the Input
Date: Thu, 11 May 2006 14:12:00 -0000	[thread overview]
Message-ID: <44634659.60508@redhat.com> (raw)
In-Reply-To: <E1Fe9fG-0007H5-3z@mail.agora-net.com>

Thien-Thi Nguyen wrote:

>why not allow computed `include' instead?  (perhaps that is already
>supported?)  something like:
>
>(include EXPR)
>
>then EXPR can be all manner of `if', `cond' or whatever.  e.g.:
>
>(include (if (application-is? SID-SIMULATOR)
>             "sid-macros.cpu"
>             "sim-macros.cpu"))
>
>(include (cond ((application-is? SID-SIMULATOR)
>                "sid-macros.cpu")
>               (else "sim-macros.cpu")))
>
>(include (case (application->symbol APPLICATION-OBJECT)
>           ((SIMULATOR) "sid-macros.cpu")
>           (else "sid-macros.cpu")))
>
>  
>
The point isn't really the (include "..."). That's just what I happened 
to use the 'if' capability for. The true and false expressions could 
theoretically be any valid top level CGEN construct. Implementing 
conditional capability for them all seems like a lot more work for no 
gain and may not even make sense in some cases. Also 'cond' or 'case' 
could easily be added as top level tests if necessary.

Dave

  reply	other threads:[~2006-05-11 14:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10 17:57 Dave Brolley
2006-05-10 18:11 ` Doug Evans
2006-05-11 11:52   ` Thien-Thi Nguyen
2006-05-11 14:12     ` Dave Brolley [this message]
2006-05-11 16:45       ` Jim Blandy
2006-05-11 20:52         ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44634659.60508@redhat.com \
    --to=brolley@redhat.com \
    --cc=cgen@sources.redhat.com \
    --cc=ttn@glug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).